Пример #1
0
 /**
  * @param Field|FieldBoolean $entity
  * @param array              $options
  *
  * @return array
  */
 public function getTemplateOptions($entity, array $options)
 {
     return ['value' => $entity->getValue() === $options['true_value'] ? $options['true_value'] : $options['false_value']];
 }
Пример #2
0
 /**
  * @param Field|FieldNumber $entity
  * @param array             $options
  *
  * @return array
  */
 public function getTemplateOptions($entity, array $options)
 {
     return ['value' => $entity->getNumber()];
 }
Пример #3
0
 /**
  * @param Field|FieldText $entity
  * @param array           $options
  *
  * @return array
  */
 public function getTemplateOptions($entity, array $options)
 {
     return ['url' => $entity->getText(), 'text' => $entity->getText(), 'new_tab' => $options['new_tab'], 'follow' => $options['follow']];
 }