BcFormHelper::editor PHP Method

editor() public method

エディタを表示する
public editor ( string $fieldName, array $options = [] ) : string
$fieldName string
$options array
return string
    public function editor($fieldName, $options = array())
    {
        $options = array_merge(array('editor' => 'BcCkeditor', 'style' => 'width:99%;height:540px'), $options);
        list($plugin, $editor) = pluginSplit($options['editor']);
        if (!empty($this->_View->{$editor})) {
            return $this->_View->{$editor}->editor($fieldName, $options);
        } elseif ($editor == 'none') {
            $_options = array();
            foreach ($options as $key => $value) {
                if (!preg_match('/^editor/', $key)) {
                    $_options[$key] = $value;
                }
            }
            return $this->input($fieldName, array_merge(array('type' => 'textarea'), $_options));
        } else {
            return $this->_View->BcCkeditor->editor($fieldName, $options);
        }
    }