/** * Creates a new Toolbar * * @param array $config The configuration values for the Toolbar object * * @return Toolbar */ public function toolbar(array $config = array()) { $appConfig = $this->container->appConfig; $defaultConfig = array('useConfigurationFile' => true, 'renderFrontendButtons' => in_array($appConfig->get("views.*.config.renderFrontendButtons"), array(true, 'true', 'yes', 'on', 1)), 'renderFrontendSubmenu' => in_array($appConfig->get("views.*.config.renderFrontendSubmenu"), array(true, 'true', 'yes', 'on', 1))); $config = array_merge($defaultConfig, $config); return parent::toolbar($config); }
/** * Creates a view template finder object for a specific View. * * The default configuration is: * Look for .php, .blade.php files; default layout "default"; no default subtemplate; * look for both pluralised and singular views; fall back to the default layout without subtemplate; * look for templates in both site and admin * * @param View $view The view this view template finder will be attached to * @param array $config Configuration variables for the object * * @return mixed */ public function viewFinder(View $view, array $config = array()) { // Initialise the configuration with the default values $defaultConfig = array('extensions' => array('.php', '.blade.php'), 'defaultLayout' => 'default', 'defaultTpl' => '', 'strictView' => false, 'strictTpl' => false, 'strictLayout' => false, 'sidePrefix' => 'any'); $config = array_merge($defaultConfig, $config); return parent::viewFinder($view, $config); }
/** * @group BasicFactory * @covers FOF30\Factory\BasicFactory::setSaveScaffolding */ public function testSetSaveScaffolding() { $factory = new BasicFactory(static::$container); $factory->setSaveScaffolding(true); $this->assertTrue(ReflectionHelper::getValue($factory, 'saveScaffolding'), 'BasicFactory::setSaveScaffolding Failed to set the save scaffolding flag'); }