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); } }
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); } } }
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); } } }
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); }
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); } }
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); } }
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); } }
/** * 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); }
/** * @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); }
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); }
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); }
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); } }
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); } }