コード例 #1
0
ファイル: Object.php プロジェクト: soundintheory/fuel-cmf
 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
ファイル: ArrayField.php プロジェクト: soundintheory/fuel-cmf
 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
ファイル: VideoEmbed.php プロジェクト: soundintheory/fuel-cmf
 /** @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']);
 }