示例#1
0
 public static function displayForm($value, &$settings, $model)
 {
     $settings = static::settings($settings);
     if ($settings['array'] === true) {
         return ArrayField::displayForm($value, $settings, $model);
     }
     $form = new ObjectForm($settings, $value);
     $content = $form->getContent($model);
     return array('content' => $content, 'assets' => $form->assets, 'merge_data' => true, 'js_data' => $form->js_field_settings, 'widget' => $settings['widget']);
 }
示例#2
0
 public static function displayForm($value, &$settings, $model)
 {
     $settings = static::settings($settings);
     if ($settings['array'] !== true) {
         $field_class = 'CMF\\Field\\Object\\Object';
         return $field_class::displayForm($value, $settings, $model);
     }
     if (!is_array($value)) {
         $value = array();
     }
     if (\Arr::is_assoc($value)) {
         $value = array($value);
     }
     $form = new ObjectForm($settings, $value);
     $content = '';
     return array('content' => $form->getContent($model), 'assets' => $form->assets, 'widget' => $settings['widget'], 'merge_data' => true, 'js_data' => $form->js_field_settings);
 }
示例#3
0
 /** @inheritdoc */
 public static function displayForm($value, &$settings, $model)
 {
     $settings = static::settings($settings);
     $form = new ObjectForm($settings, $value);
     $form->getContent($model);
     return array('content' => \View::forge('admin/fields/videoembed.twig', array('form' => $form, 'value' => $value), false), 'assets' => $form->assets, 'merge_data' => true, 'js_data' => $form->js_field_settings, 'widget' => $settings['widget']);
 }