Example #1
0
 /**
  * @return array
  */
 public function getField()
 {
     $fieldHasModule = $this->objectManager->getRepository("BigfishEavBundle:ModuleHasField")->findField($this->field, $this->module);
     $container = isset($this->options["container"]) ? $this->options["container"] : null;
     $options = $fieldHasModule->getOptions();
     if (isset($options['area'])) {
         $area = $this->objectManager->getRepository('BigfishPagekitBundle:Area')->find((int) $options['area']);
         if ($area) {
             $category = $area->getCategory();
         }
     }
     return array('identifier' => $this->field->getIdentifier(), 'formType' => $this->field->getFormType(), 'formAttributes' => array('resource' => $container->getResource(), 'area' => isset($area) ? $area : null, 'category' => isset($category) ? $category : null, "container" => $container, "field" => $this->field, 'label' => $this->field->getName(), 'attr' => array('help_text' => $this->field->getDescription())));
 }
Example #2
0
 /**
  * @return array
  */
 public function getField()
 {
     $container = isset($this->options['container']) ? $this->options['container'] : null;
     $ids = array();
     $height = array();
     $width = array();
     $helpMessage = array();
     foreach ($this->field->getDimensions() as $dimension) {
         $height[] = (int) $dimension->getMinHeight();
         $height[] = (int) $dimension->getFixedHeight();
         $width[] = (int) $dimension->getMinWidth();
         $width[] = (int) $dimension->getFixedWidth();
         $ids[] = $dimension->getId();
     }
     $helpMessage[] = $this->field->getDescription();
     if (count($height) > 0) {
         $helpMessage[] = $this->translator->trans('bigfish.media.help.sizes', array('%height%' => max($height), '%width%' => max($width)));
     }
     return array('identifier' => $this->field->getIdentifier(), 'formType' => $this->field->getFormType(), 'formAttributes' => array('container' => $container, 'field' => $this->field, 'label' => $this->field->getName(), 'attr' => array('data-dimensions' => implode(',', $ids), 'class' => 'uploadValue', 'help_text' => ltrim(implode('<BR>', $helpMessage), '<BR>'))));
 }
Example #3
0
 /**
  * @return array
  */
 public function getField()
 {
     return array('identifier' => $this->field->getIdentifier(), 'formType' => $this->field->getFormType(), 'formAttributes' => array('label' => $this->field->getName(), 'attr' => array('help_text' => $this->field->getDescription())));
 }
Example #4
0
 /**
  * @return array
  */
 public function getField()
 {
     $findBelongsTo = $this->objectManager->getRepository('BigfishEavBundle:ModuleHasField')->findOneRelatedModule($this->field, $this->module);
     $container = isset($this->options['container']) ? $this->options['container'] : null;
     return array('identifier' => $this->field->getIdentifier(), 'formType' => $this->field->getFormType(), 'formAttributes' => array('gridModule' => $findBelongsTo, 'container' => $container, 'field' => $this->field, 'label' => $this->field->getName(), 'attr' => array('help_text' => $this->field->getDescription())));
 }
Example #5
0
 /**
  * @return array
  */
 public function getField()
 {
     return array('identifier' => $this->field->getIdentifier(), 'formType' => $this->field->getFormType(), 'formAttributes' => array('label' => $this->field->getName(), 'choices' => array(99 => 'Ediwn', 'Boezelman')));
 }