本文整理汇总了PHP中Gdn_Format::wysiwyg方法的典型用法代码示例。如果您正苦于以下问题:PHP Gdn_Format::wysiwyg方法的具体用法?PHP Gdn_Format::wysiwyg怎么用?PHP Gdn_Format::wysiwyg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gdn_Format
的用法示例。
在下文中一共展示了Gdn_Format::wysiwyg方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: settingsController_emojiExtender_create
/**
* Configure settings page in dashboard.
*
* @param SettingsController $sender
* @param array $args
*/
public function settingsController_emojiExtender_create($sender, $args)
{
$sender->permission('Garden.Settings.Manage');
$cf = new ConfigurationModule($sender);
$items = array();
foreach ($this->getEmojiSets() as $key => $emojiSet) {
$manifest = $this->getManifest($emojiSet);
$selected = '<svg class="icon icon-svg-checkmark" viewBox="0 0 17 17"><use xlink:href="#checkmark" /></svg>';
$icon = isset($manifest['icon']) ? img($emojiSet['basePath'] . '/' . $manifest['icon'], array('alt' => $manifest['name'], 'class' => 'label-selector-image')) : '';
$items[$key] = '@<div class="image-wrap">' . $icon . '<div class="overlay">' . '<div class="buttons">' . '<a class="btn btn-overlay">' . t('Select') . '</a>' . '</div>' . '<div class="selected">' . $selected . '</div>' . '</div>' . '</div>' . '<div emojiset-body>' . '<div><b>' . htmlspecialchars($manifest['name']) . '</b></div>' . (empty($manifest['author']) ? '' : '<div class="emojiset-author info">' . sprintf(t('by %s'), $manifest['author']) . '</div>') . (empty($manifest['description']) ? '' : '<p class="emojiset-description">' . Gdn_Format::wysiwyg($manifest['description']) . '</p>') . '</div>';
}
$cf->initialize(array('Garden.EmojiSet' => array('LabelCode' => 'Emoji Set', 'Control' => 'radiolist', 'Items' => $items, 'Options' => array('list' => true, 'list-item-class' => 'label-selector-item', 'listclass' => 'emojiext-list label-selector', 'display' => 'after', 'class' => 'label-selector-input', 'no-grid' => true))));
$sender->setData('Title', t('Choose Your Emoji Set'));
$cf->renderAll();
}
示例2: settingsController_emojiExtender_create
/**
* Configure settings page in dashboard.
*
* @param SettingsController $sender
* @param array $args
*/
public function settingsController_emojiExtender_create($sender, $args)
{
$cf = new ConfigurationModule($sender);
$items = array();
foreach ($this->getEmojiSets() as $key => $emojiSet) {
$manifest = $this->getManifest($emojiSet);
$icon = isset($manifest['icon']) ? img($emojiSet['basePath'] . '/' . $manifest['icon'], array('alt' => $manifest['name'])) : '';
$items[$key] = '@' . $icon . '<div emojiset-body>' . '<div><b>' . htmlspecialchars($manifest['name']) . '</b></div>' . (empty($manifest['author']) ? '' : '<div class="emojiset-author">' . sprintf(t('by %s'), $manifest['author']) . '</div>') . (empty($manifest['description']) ? '' : '<p class="emojiset-description">' . Gdn_Format::wysiwyg($manifest['description']) . '</p>') . '</div>';
}
$cf->initialize(array('Garden.EmojiSet' => array('LabelCode' => 'Emoji Set', 'Control' => 'radiolist', 'Description' => '<p>Which emoji set would you like to use?</p>', 'Items' => $items, 'Options' => array('list' => true, 'listclass' => 'emojiext-list', 'display' => 'after'))));
$sender->addCssFile('settings.css', 'plugins/EmojiExtender');
$sender->addSideMenu();
$sender->setData('Title', sprintf(t('%s Settings'), 'Emoji'));
$cf->renderAll();
}