本文整理汇总了PHP中Field::displayDatasourceFilterPanel方法的典型用法代码示例。如果您正苦于以下问题:PHP Field::displayDatasourceFilterPanel方法的具体用法?PHP Field::displayDatasourceFilterPanel怎么用?PHP Field::displayDatasourceFilterPanel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Field
的用法示例。
在下文中一共展示了Field::displayDatasourceFilterPanel方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayDatasourceFilterPanel
function displayDatasourceFilterPanel(&$wrapper, $data = NULL, $errors = NULL, $fieldnamePrefix = NULL, $fieldnamePostfix = NULL)
{
parent::displayDatasourceFilterPanel($wrapper, $data, $errors, $fieldnamePrefix, $fieldnamePostfix);
$existing_options = array('yes', 'no');
if (is_array($existing_options) && !empty($existing_options)) {
$optionlist = new XMLElement('ul');
$optionlist->setAttribute('class', 'tags');
foreach ($existing_options as $option) {
$optionlist->appendChild(new XMLElement('li', $option));
}
$wrapper->appendChild($optionlist);
}
}
示例2: displayDatasourceFilterPanel
function displayDatasourceFilterPanel(&$wrapper, $data = NULL, $errors = NULL, $fieldnamePrefix = NULL, $fieldnamePostfix = NULL)
{
parent::displayDatasourceFilterPanel($wrapper, $data, $errors, $fieldnamePrefix, $fieldnamePostfix);
if ($this->get('pre_populate_source') != NULL) {
$existing_tags = $this->findAllTags();
if (is_array($existing_tags) && !empty($existing_tags)) {
$taglist = new XMLElement('ul');
$taglist->setAttribute('class', 'tags');
foreach ($existing_tags as $tag) {
$taglist->appendChild(new XMLElement('li', $tag));
}
$wrapper->appendChild($taglist);
}
}
}
示例3: displayDatasourceFilterPanel
public function displayDatasourceFilterPanel(XMLElement &$wrapper, $data = null, $errors = null, $fieldnamePrefix = null, $fieldnamePostfix = null)
{
parent::displayDatasourceFilterPanel($wrapper, $data, $errors, $fieldnamePrefix, $fieldnamePostfix);
if ($this->get('pre_populate_source') != null) {
$existing_tags = $this->getToggleStates();
if (is_array($existing_tags) && !empty($existing_tags)) {
$taglist = new XMLElement('ul');
$taglist->setAttribute('class', 'tags');
$taglist->setAttribute('data-interactive', 'data-interactive');
foreach ($existing_tags as $tag) {
$taglist->appendChild(new XMLElement('li', General::sanitize($tag)));
}
$wrapper->appendChild($taglist);
}
}
}
示例4: displayDatasourceFilterPanel
public function displayDatasourceFilterPanel(&$wrapper, $data = NULL, $errors = NULL, $fieldnamePrefix = NULL, $fieldnamePostfix = NULL)
{
parent::displayDatasourceFilterPanel($wrapper, $data, $errors, $fieldnamePrefix, $fieldnamePostfix);
$taglist = new XMLElement('ul');
$taglist->setAttribute('class', 'tags');
foreach (array('unread') as $tag) {
$taglist->appendChild(new XMLElement('li', General::sanitize($tag)));
}
$wrapper->appendChild($taglist);
}
示例5: displayDatasourceFilterPanel
public function displayDatasourceFilterPanel(XMLElement &$wrapper, $data = null, $errors = null, $fieldnamePrefix = NULL, $fieldnamePostfix = NULL)
{
parent::displayDatasourceFilterPanel($wrapper, $data, $errors, $fieldnamePrefix, $fieldnamePostfix);
$data = preg_split('/,\\s*/i', $data);
$data = array_map('trim', $data);
$existing_options = $this->getToggleStates();
if (is_array($existing_options) && !empty($existing_options)) {
$optionlist = new XMLElement('ul');
$optionlist->setAttribute('class', 'tags');
foreach ($existing_options as $option) {
$optionlist->appendChild(new XMLElement('li', General::sanitize($option)));
}
$wrapper->appendChild($optionlist);
}
}
示例6: displayDatasourceFilterPanel
public function displayDatasourceFilterPanel(SymphonyDOMElement $wrapper, $data = NULL, MessageStack $errors = NULL)
{
parent::displayDatasourceFilterPanel($wrapper, $data, $errors);
$document = $wrapper->ownerDocument;
$existing_options = $this->getToggleStates();
$div = $document->createElement('div');
$label = $document->xpath('.//label[last()]', $wrapper)->item(0);
$label->wrapWith($div);
if (is_array($existing_options) && !empty($existing_options)) {
$optionlist = $document->createElement('ul');
$optionlist->setAttribute('class', 'tags');
foreach ($existing_options as $option) {
$optionlist->appendChild($document->createElement('li', $option));
}
$div->appendChild($optionlist);
}
}
示例7: displayDatasourceFilterPanel
public function displayDatasourceFilterPanel(SymphonyDOMElement $wrapper, $data = NULL, MessageStack $errors = NULL)
{
parent::displayDatasourceFilterPanel($wrapper, $data, $errors);
if (!is_null($this->{'suggestion-list-source'})) {
$document = $wrapper->ownerDocument;
$existing_options = $this->getToggleStates();
$div = $document->createElement('div');
$label = $document->xpath('.//label[last()]', $wrapper)->item(0);
$label->wrapWith($div);
$this->prepopulateSource($div);
}
}
示例8: displayDatasourceFilterPanel
/**
* Generate data source filter panel.
*
* @param XMLElement $wrapper
* @param array $data
* @param $errors
* @param $fieldnamePrefix
* @param $fieldnamePostfix
*/
function displayDatasourceFilterPanel(&$wrapper, $data = NULL, $errors = NULL, $fieldnamePrefix = NULL, $fieldnamePostfix = NULL)
{
parent::displayDatasourceFilterPanel($wrapper, $data, $errors, $fieldnamePrefix, $fieldnamePostfix);
$text = new XMLElement('p', __('Use comma separated entry ids for filtering.'), array('class' => 'help'));
$wrapper->appendChild($text);
}
示例9: displayDatasourceFilterPanel
/**
* @see http://symphony-cms.com/learn/api/2.3/toolkit/field/#displayDatasourceFilterPanel
*/
function displayDatasourceFilterPanel(&$wrapper, $data = null, $errors = null, $fieldnamePrefix = null, $fieldnamePostfix = null)
{
parent::displayDatasourceFilterPanel($wrapper, $data, $errors, $fieldnamePrefix, $fieldnamePostfix);
$text = new XMLElement('p', __('Use comma separated list of entry ids that has to be associated with filtered entries, e.g., "23, 45, 691" or "not: 23, 45, 691".'), array('class' => 'help'));
$wrapper->appendChild($text);
}
示例10: displayDatasourceFilterPanel
public function displayDatasourceFilterPanel(&$wrapper, $data = null, $errors = null, $fieldnamePrefix = null, $fieldnamePostfix = null)
{
parent::displayDatasourceFilterPanel($wrapper, $data, $errors, $fieldnamePrefix, $fieldnamePostfix);
$text = new XMLElement('p', __('To filter by ranges, add <code>%s</code> to the beginning of the filter input. Use <code>%s</code> for field name. E.G. <code>%s</code>', array('mysql:', 'value', 'mysql: value >= 1.01 AND value <= {$price}')), array('class' => 'help'));
$wrapper->appendChild($text);
}
示例11: displayDatasourceFilterPanel
public function displayDatasourceFilterPanel(XMLElement &$wrapper, $data = null, $errors = null, $fieldnamePrefix = null, $fieldnamePostfix = null)
{
Extension_TextBoxField::appendHeaders(Extension_TextBoxField::FILTER_HEADERS);
$field_id = $this->get('id');
parent::displayDatasourceFilterPanel($wrapper, $data, $errors, $fieldnamePrefix, $fieldnamePostfix);
$wrapper->setAttribute('class', $wrapper->getAttribute('class') . ' field-textbox');
$filters = array(array('name' => 'boolean', 'filter' => 'boolean:', 'help' => __('Find values that match the given query. Can use operators <code>and</code> and <code>not</code>.')), array('name' => 'not-boolean', 'filter' => 'not-boolean:', 'help' => __('Find values that do not match the given query. Can use operators <code>and</code> and <code>not</code>.')), array('name' => 'regexp', 'filter' => 'regexp:', 'help' => __('Find values that match the given <a href="%s">MySQL regular expressions</a>.', array('http://dev.mysql.com/doc/mysql/en/Regexp.html'))), array('name' => 'not-regexp', 'filter' => 'not-regexp:', 'help' => __('Find values that do not match the given <a href="%s">MySQL regular expressions</a>.', array('http://dev.mysql.com/doc/mysql/en/Regexp.html'))), array('name' => 'contains', 'filter' => 'contains:', 'help' => __('Find values that contain the given string.')), array('name' => 'not-contains', 'filter' => 'not-contains:', 'help' => __('Find values that do not contain the given string.')), array('name' => 'starts-with', 'filter' => 'starts-with:', 'help' => __('Find values that start with the given string.')), array('name' => 'not-starts-with', 'filter' => 'not-starts-with:', 'help' => __('Find values that do not start with the given string.')), array('name' => 'ends-with', 'filter' => 'ends-with:', 'help' => __('Find values that end with the given string.')), array('name' => 'not-ends-with', 'filter' => 'not-ends-with:', 'help' => __('Find values that do not end with the given string.')));
$list = new XMLElement('ul');
$list->setAttribute('class', 'filter-prefix-suggestions');
foreach ($filters as $value) {
$item = new XMLElement('li', $value['name']);
$item->setAttribute('title', $value['filter']);
$item->setAttribute('alt', General::sanitize($value['help']));
$list->appendChild($item);
}
$help = new XMLElement('p');
$help->setAttribute('class', 'help');
$help->setValue(__('Find values that are an exact match for the given string.'));
$wrapper->appendChild($list);
$wrapper->appendChild($help);
}
示例12: displayDatasourceFilterPanel
public function displayDatasourceFilterPanel(&$wrapper, $data = NULL, $errors = NULL, $fieldnamePrefix = NULL, $fieldnamePostfix = NULL)
{
parent::displayDatasourceFilterPanel($wrapper, $data, $errors, $fieldnamePrefix, $fieldnamePostfix);
$data = preg_split('/,\\s*/i', $data);
$data = array_map('trim', $data);
$existing_options = $this->fetchLanguages();
if (is_array($existing_options) && !empty($existing_options)) {
$optionlist = new XMLElement('ul');
$optionlist->setAttribute('class', 'tags');
foreach ($existing_options as $option) {
$optionlist->appendChild(new XMLElement('li', $this->lang[$option], array('class' => $option)));
}
$wrapper->appendChild($optionlist);
}
}
示例13: displayDatasourceFilterPanel
public function displayDatasourceFilterPanel(&$wrapper, $data = null, $errors = null, $prefix = null, $postfix = null)
{
parent::displayDatasourceFilterPanel($wrapper, $data, $errors, $prefix, $postfix);
if ($this->get('pre_populate') == 'yes') {
$tags = $this->_driver->getTags($this->get('id'));
$this->prepareValues($tags);
$taglist = new XMLElement('ul');
$taglist->setAttribute('class', 'tags');
foreach ($tags as $tag) {
$taglist->appendChild(new XMLElement('li', $tag));
}
$wrapper->appendChild($taglist);
}
}