PHP Class WysiwygAppHelper

WysiwygAppHelper encloses all methods needed while working with HTML pages.
Inheritance: extends AppHelper
Afficher le fichier Open project: josegonzalez/cakephp-wysiwyg Class Usage Examples

Méthodes publiques

Свойство Type Description
$helpers array Helper dependencies

Protected Properties

Свойство Type Description
$_helperOptions public $helpers = array( 'Wysiwyg.Tinymce' => array( 'theme_advanced_toolbar_align' => 'right', ) );
$_initialized boolean Whether helper has been initialized once or not

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
_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

Method Details

__construct() public méthode

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.
Résultat void

_initializationOptions() protected méthode

Returns a json string containing helper settings
protected _initializationOptions ( array $options = [] ) : string
$options array array of Wysiwyg editor settings
Résultat string json_encoded array of options

_initialize() protected méthode

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
Résultat void

input() public méthode

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.
Résultat string An HTML input element with Wysiwyg Js

textarea() public méthode

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.
Résultat string An HTML textarea element with Wysiwyg Js

Property Details

$_helperOptions protected_oe property

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

$_initialized protected_oe property

Whether helper has been initialized once or not
protected bool $_initialized
Résultat boolean

$helpers public_oe property

Helper dependencies
public array $helpers
Résultat array