コード例 #1
0
 /**
  * @param ConfigureOptionsEvent $event
  */
 public function configureOptions(ConfigureOptionsEvent $event)
 {
     $options = $event->getOptions();
     $options->setDefaults(['path' => null, 'node_name' => null, 'parent_path' => null, 'auto_create' => false]);
     $options->setAllowedTypes('path', ['null', 'string']);
     $options->setAllowedTypes('node_name', ['null', 'string']);
     $options->setAllowedTypes('parent_path', ['null', 'string']);
     $options->setAllowedTypes('auto_create', 'bool');
 }
コード例 #2
0
ファイル: BlameSubscriber.php プロジェクト: sulu/sulu
 /**
  * @param ConfigureOptionsEvent $event
  */
 public function configureOptions(ConfigureOptionsEvent $event)
 {
     $event->getOptions()->setDefaults(['user' => null]);
 }
コード例 #3
0
 public function handleConfigureOptions(ConfigureOptionsEvent $event)
 {
     $options = $event->getOptions();
     $options->setDefaults(['test.foo' => 'bar']);
 }
コード例 #4
0
ファイル: StructureSubscriber.php プロジェクト: sulu/sulu
 /**
  * @param ConfigureOptionsEvent $event
  */
 public function configureOptions(ConfigureOptionsEvent $event)
 {
     $options = $event->getOptions();
     $options->setDefaults(['load_ghost_content' => true, 'clear_missing_content' => false, 'ignore_required' => false]);
     $options->setAllowedTypes(['load_ghost_content' => 'bool', 'clear_missing_content' => 'bool', 'ignore_required' => 'bool']);
 }
コード例 #5
0
 /**
  * @param ConfigureOptionsEvent $event
  */
 public function configureOptions(ConfigureOptionsEvent $event)
 {
     $options = $event->getOptions();
     $options->setDefaults(['type' => null]);
 }
コード例 #6
0
ファイル: StructureSubscriber.php プロジェクト: ollietb/sulu
 /**
  * @param ConfigureOptionsEvent $event
  */
 public function configureOptions(ConfigureOptionsEvent $event)
 {
     $options = $event->getOptions();
     $options->setDefaults(['load_ghost_content' => true]);
     $options->setAllowedTypes(['load_ghost_content' => 'bool']);
 }