Hooking into Dev/Build

If you would like to hook code before / after the dev/build ...

class DevBuildExtension extends DevBuildController {
	private static $url_handlers = array(
		'' => 'build'
	);

	private static $allowed_actions = array(
		'build'
	);

	public function build($request) {

		//do stuff before the build
		parent::build($request);
		//do stuff after the build
	}
}


And to link this in add this to _config.yml

DevelopmentAdmin:
  registered_controllers:
      build:
        controller: 'DevBuildExtension'
Rate this post (2 rating(s))