Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getFieldDefinition($arrOverrides = array())
 {
     $arrFieldDef = parent::getFieldDefinition($arrOverrides);
     $arrFieldDef['inputType'] = 'text';
     $arrFieldDef['eval']['rgxp'] = 'digit';
     return $arrFieldDef;
 }
 /**
  * {@inheritdoc}
  */
 public function getFieldDefinition($arrOverrides = array())
 {
     $arrFieldDef = parent::getFieldDefinition($arrOverrides);
     $arrFieldDef['inputType'] = 'text';
     // We do not need to set mandatory, as we will automatically update our value when isunique is given.
     if ($this->get('isunique')) {
         $arrFieldDef['eval']['mandatory'] = false;
     }
     return $arrFieldDef;
 }
Exemplo n.º 3
0
 /**
  * {@inheritDoc}
  */
 public function getFieldDefinition($arrOverrides = array())
 {
     $arrFieldDef = parent::getFieldDefinition($arrOverrides);
     $arrFieldDef['inputType'] = 'text';
     $arrFieldDef['eval']['maxlength'] = 6;
     $arrFieldDef['eval']['size'] = 2;
     $arrFieldDef['eval']['multiple'] = true;
     $arrFieldDef['eval']['isHexColor'] = true;
     $arrFieldDef['eval']['decodeEntities'] = true;
     $arrFieldDef['eval']['tl_class'] .= ' wizard inline';
     return $arrFieldDef;
 }
Exemplo n.º 4
0
 /**
  * {@inheritDoc}
  */
 public function getFieldDefinition($arrOverrides = array())
 {
     $arrFieldDef = parent::getFieldDefinition($arrOverrides);
     $arrFieldDef['inputType'] = 'text';
     // W do not need to set mandatory, as we will automatically update our value when isunique is given.
     if ($this->get('isunique')) {
         $arrFieldDef['eval']['mandatory'] = false;
     }
     // If "force_alias" is ture set alwaysSave to true.
     if ($this->get('force_alias')) {
         $arrFieldDef['eval']['alwaysSave'] = true;
     }
     return $arrFieldDef;
 }
Exemplo n.º 5
0
 /**
  * {@inheritdoc}
  */
 public function getFieldDefinition($arrOverrides = array())
 {
     $arrFieldDef = parent::getFieldDefinition($arrOverrides);
     $arrFieldDef['inputType'] = 'text';
     if (!isset($arrFieldDef['eval']['tl_class'])) {
         $arrFieldDef['eval']['tl_class'] = '';
     }
     $arrFieldDef['eval']['tl_class'] .= ' wizard inline';
     if (!$this->get('trim_title')) {
         $arrFieldDef['eval']['size'] = 2;
         $arrFieldDef['eval']['multiple'] = true;
         $arrFieldDef['eval']['tl_class'] .= ' metamodelsattribute_url';
     }
     /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher */
     $dispatcher = $this->getMetaModel()->getServiceContainer()->getEventDispatcher();
     $dispatcher->addListener(ManipulateWidgetEvent::NAME, array(new UrlWizardHandler($this->getMetaModel(), $this->getColName()), 'getWizard'));
     return $arrFieldDef;
 }
Exemplo n.º 6
0
 /**
  * {@inheritDoc}
  */
 public function getFieldDefinition($arrOverrides = array())
 {
     $arrFieldDef = parent::getFieldDefinition($arrOverrides);
     $arrFieldDef['inputType'] = 'select';
     $arrFieldDef['eval']['chosen'] = true;
     $arrFieldDef['options'] = $this->getCountries();
     $arrSelectable = deserialize($this->get('countries'), true);
     if ($arrSelectable) {
         $arrFieldDef['options'] = array_intersect_key($arrFieldDef['options'], array_flip($arrSelectable));
     }
     return $arrFieldDef;
 }
Exemplo n.º 7
0
 /**
  * {@inheritDoc}
  */
 public function getFieldDefinition($arrOverrides = array())
 {
     $arrFieldDef = parent::getFieldDefinition($arrOverrides);
     $arrFieldDef['inputType'] = 'textarea';
     return $arrFieldDef;
 }
Exemplo n.º 8
0
 /**
  * {@inheritdoc}
  */
 public function getFieldDefinition($arrOverrides = array())
 {
     $arrFieldDef = parent::getFieldDefinition($arrOverrides);
     $arrFieldDef['inputType'] = 'fileTree';
     $arrFieldDef['eval']['files'] = true;
     $arrFieldDef['eval']['extensions'] = \Config::get('allowedDownload');
     $arrFieldDef['eval']['multiple'] = (bool) $this->get('file_multiple');
     if ($this->get('file_multiple')) {
         $arrFieldDef['eval']['fieldType'] = 'checkbox';
     } else {
         $arrFieldDef['eval']['fieldType'] = 'radio';
     }
     if ($this->get('file_customFiletree')) {
         $this->handleCustomFileTree($arrFieldDef);
     }
     return $arrFieldDef;
 }
Exemplo n.º 9
0
 /**
  * {@inheritDoc}
  */
 public function getFieldDefinition($arrOverrides = array())
 {
     $arrFieldDef = parent::getFieldDefinition($arrOverrides);
     $arrFieldDef['inputType'] = 'select';
     $arrFieldDef['eval']['chosen'] = true;
     $arrFieldDef['options'] = array_intersect_key($this->getLanguageNames(), array_flip((array) $this->get('langcodes')));
     return $arrFieldDef;
 }