The Dispatcher and Toolbar will be created from default objects if specialised classes are not found in your application.
Inheritance: extends BasicFactory, implements FOF30\Factory\FactoryInterface
コード例 #1
0
ファイル: SwitchFactoryTest.php プロジェクト: Joal01/fof
 /**
  * @group           SwitchFactory
  * @covers          FOF30\Factory\SwitchFactory::transparentAuthentication
  * @dataProvider    SwitchFactoryDataprovider::getTestTransparentAuthentication
  */
 public function testTransparentAuthentication($test, $check)
 {
     $msg = 'SwitchFactory::transparentAuthentication %s - Case: ' . $check['case'];
     $container = new TestContainer(array('componentName' => $test['component']));
     $platform = $container->platform;
     $platform::$isAdmin = $test['backend'];
     $factory = new SwitchFactory($container);
     $result = $factory->transparentAuthentication();
     $this->assertEquals($check['result'], get_class($result), sprintf($msg, 'Returned the wrong result'));
 }
コード例 #2
0
ファイル: MagicSwitchFactory.php プロジェクト: akeeba/fof
 /**
  * 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);
 }