PHP 클래스 WysiwygAppHelper

WysiwygAppHelper encloses all methods needed while working with HTML pages.
상속: extends AppHelper
파일 보기 프로젝트 열기: josegonzalez/cakephp-wysiwyg 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$helpers array Helper dependencies

보호된 프로퍼티들

프로퍼티 타입 설명
$_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