Esempio n. 1
0
 public function redactor($subject, $fieldName, $locale = '', $options = [])
 {
     return Form::textarea(Form::getTranslatedFieldName($fieldName, $locale), Form::useInitialValue($subject, $fieldName, $locale), array_merge($options, ['data-redactor' => '', 'data-redactor-medialibrary-url' => URL::action('Back\\MediaLibraryApiController@add', [short_class_name($subject), $subject->id, 'redactor'])]));
 }
Esempio n. 2
0
 public function redactor($subject, string $fieldName, string $locale = '', array $options = []) : string
 {
     $initial = $this->useInitialValue($subject, $fieldName, $locale);
     $fieldName = $locale ? translate_field_name($fieldName, $locale) : $fieldName;
     return $this->textarea($fieldName, $initial, array_merge($options, ['data-editor', 'data-editor-medialibrary-url' => action('Back\\Api\\MediaLibraryController@add', [short_class_name($subject), $subject->id, 'redactor'])]));
 }