PHP Класс WysiwygAppHelper

WysiwygAppHelper encloses all methods needed while working with HTML pages.
Наследование: extends AppHelper
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$helpers array Helper dependencies

Защищенные свойства (Protected)

Свойство Тип Описание
$_helperOptions public $helpers = array( 'Wysiwyg.Tinymce' => array( 'theme_advanced_toolbar_align' => 'right', ) );
$_initialized boolean Whether helper has been initialized once or not

Открытые методы

Метод Описание
__construct ( View $View, array $settings = [] ) : void Sets the $this->helper to the helper configured in the session
input ( string $fieldName, array $options = [], array $helperOptions = [] ) : string Creates an fckeditor input field
textarea ( string $fieldName, array $options = [], array $helperOptions = [] ) : string Creates an fckeditor textarea

Защищенные методы

Метод Описание
_initializationOptions ( array $options = [] ) : string Returns a json string containing helper settings
_initialize ( array $options = [] ) : void Initialize the helper css and js for a given input field

Описание методов

__construct() публичный Метод

Sets the $this->helper to the helper configured in the session
public __construct ( View $View, array $settings = [] ) : void
$View View The View this helper is being attached to.
$settings array Configuration settings for the helper.
Результат void

_initializationOptions() защищенный Метод

Returns a json string containing helper settings
protected _initializationOptions ( array $options = [] ) : string
$options array array of Wysiwyg editor settings
Результат string json_encoded array of options

_initialize() защищенный Метод

Initialize the helper css and js for a given input field
protected _initialize ( array $options = [] ) : void
$options array array of css files, javascript files, and css text to enqueue
Результат void

input() публичный Метод

Creates an fckeditor input field
public input ( string $fieldName, array $options = [], array $helperOptions = [] ) : string
$fieldName string This should be "Modelname.fieldname"
$options array Each type of input takes different options.
$helperOptions array Each type of wysiwyg helper takes different options.
Результат string An HTML input element with Wysiwyg Js

textarea() публичный Метод

Creates an fckeditor textarea
public textarea ( string $fieldName, array $options = [], array $helperOptions = [] ) : string
$fieldName string This should be "Modelname.fieldname"
$options array Each type of input takes different options.
$helperOptions array Each type of wysiwyg helper takes different options.
Результат string An HTML textarea element with Wysiwyg Js

Описание свойств

$_helperOptions защищенное свойство

public $helpers = array( 'Wysiwyg.Tinymce' => array( 'theme_advanced_toolbar_align' => 'right', ) );
protected $_helperOptions

$_initialized защищенное свойство

Whether helper has been initialized once or not
protected bool $_initialized
Результат boolean

$helpers публичное свойство

Helper dependencies
public array $helpers
Результат array