yf_html5fw_empty class| File | plugins/html/classes/html5fw/yf_html5fw_empty.class.php |
|---|---|
| Use | _class('html5fw_empty', 'classes/html5fw/') |
| Property | Default | Description |
|---|---|---|
| None declared in this class. | ||
public function form_dd_row($content, $extra = [], $replace = [], $form = null)
public function form_dd_row($content, $extra = [], $replace = [], $form = null)
{
// TODO
return $this->form_row($content, $extra, $replace, $form = null);
}
public function form_render_out($content, $extra = [], $replace = [], $form = null)
public function form_render_out($content, $extra = [], $replace = [], $form = null)
{
return $content;
}
public function form_row($content, $extra = [], $replace = [], $form = null)
public function form_row($content, $extra = [], $replace = [], $form = null)
{
$row_start =
'<div>' . PHP_EOL
. (($extra['desc'] ?? null) && ! ($extra['no_label'] ?? null) ? '<label for="' . ($extra['id'] ?? null) . '">' . t($extra['desc'] ?? null) . '</label>' . PHP_EOL : '')
. ( ! ($extra['wide'] ?? null) ? '<div>' . PHP_EOL : '');
$row_end =
( ! ($extra['wide'] ?? null) ? '</div>' . PHP_EOL : '')
. '</div>' . PHP_EOL;
$before_content_html = '';
$after_content_html = '';
$edit_link_html = (($extra['edit_link'] ?? null) ? ' <a href="' . _escape_tpl_braces(_htmlchars($extra['edit_link'])) . '"><i></i> ' . t('Edit') . '</a>' . PHP_EOL : '');
$link_name_html = ((($extra['link_url'] ?? null) && ($extra['link_name'] ?? null)) ? ' <a href="' . ($extra['link_url'] ?? null) . '">' . t($extra['link_name'] ?? null) . '</a>' . PHP_EOL : '');
$inline_help_html = (($extra['inline_help'] ?? null) ? '<span>' . ($extra['inline_help'] ?? null) . '</span>' . PHP_EOL : '');
$inline_tip_html = (($extra['tip'] ?? null) ? ' ' . tip(($extra['tip'] ?? null), $replace) : '');
if ($extra['only_row_start'] ?? null) {
return $row_start;
} elseif ($extra['only_row_end'] ?? null) {
return $row_end;
} elseif ($extra['stacked'] ?? null) {
return $before_content_html . $content . PHP_EOL . $after_content_html
. $edit_link_html . $link_name_html . $inline_help_html . $inline_tip_html;
}
// Full variant
return $row_start
. $before_content_html . $content . PHP_EOL . $after_content_html
. $edit_link_html . $link_name_html . $inline_help_html . $inline_tip_html
. $this->_add_rich_editor($extra, $replace, $form)
. $row_end;
}
_ hooks and helpers; not routable as page actionspublic function _add_rich_editor($extra = [], $replace = [], $form = null)
public function _add_rich_editor($extra = [], $replace = [], $form = null)
{
$out = [];
if (isset($extra['ace_editor']) && $extra['ace_editor']) {
$out[] = $form->_ace_editor_html($extra, $replace);
}
if (isset($extra['ckeditor']) && $extra['ckeditor']) {
$out[] = $form->_ckeditor_html($extra, $replace);
}
if (isset($extra['tinymce']) && $extra['tinymce']) {
$out[] = $form->_tinymce_html($extra, $replace);
}
return implode(PHP_EOL, $out);
}