Example #1
0
 /**
  * @param bool $printDefaults
  *
  * @return array
  */
 public function toArray($printDefaults = false)
 {
     $array = parent::toArray($printDefaults);
     if ($this->getType() && $this->hasFieldType()) {
         $array['selection'] = $this->getFieldType()->getSelection();
     }
     return $array;
 }
Example #2
0
 /**
  * @param JarvesConfig $jarvesConfig
  * @param string $adminPrefix
  * @param string $cacheDir
  * @param string $rootDir
  * @param string $environment
  * @param string $debugMode
  * @param KernelInterface $kernel
  * @param RequestStack $requestStack
  * @param EventDispatcherInterface $eventDispatcher
  * @param FieldTypes $fieldTypes
  */
 function __construct(JarvesConfig $jarvesConfig, $adminPrefix, $cacheDir, $rootDir, $environment, $debugMode, KernelInterface $kernel, RequestStack $requestStack, EventDispatcherInterface $eventDispatcher, FieldTypes $fieldTypes)
 {
     Configuration\Model::$serialisationJarvesCore = $this;
     $this->adminPrefix = $adminPrefix;
     $this->requestStack = $requestStack;
     $this->cacheDir = $cacheDir;
     $this->rootDir = $rootDir;
     $this->environment = $environment;
     $this->debugMode = $debugMode;
     $this->kernel = $kernel;
     $this->eventDispatcher = $eventDispatcher;
     $this->fieldTypes = $fieldTypes;
     $this->jarvesConfig = $jarvesConfig;
 }
Example #3
0
 /**
  * {@inheritdoc}
  */
 public function toArray($printDefaults = false)
 {
     $array = parent::toArray($printDefaults);
     $array['key'] = $this->getKey();
     return $array;
 }
Example #4
0
 /**
  * @param bool $printDefaults
  * @return array
  */
 public function toArray($printDefaults = false)
 {
     $value['name'] = $this->getBundleName();
     $value['class'] = get_class($this->getBundleClass());
     $value = array_merge($value, parent::toArray($printDefaults));
     return $value;
 }