private $_scanner;
public function _run(Result $result) {
+ $this->_scanner = new Examples();
if ($this->select !== [] && !in_array('name', $this->select)) {
$this->select[] = 'name';
}
}
protected function getRecords() {
- $this->_scanner = new Examples();
- $all = $this->_scanner->findAll();
- foreach ($all as &$example) {
- $example['tags'] = !empty($example['tags']) ? \CRM_Utils_Array::implodePadded($example['tags']) : '';
- }
- return $all;
+ return $this->_scanner->findAll();
}
protected function selectArray($values) {
[
'name' => 'tags',
'title' => 'Tags',
- 'data_type' => 'String',
- 'serialize' => \CRM_Core_DAO::SERIALIZE_SEPARATOR_BOOKEND,
+ 'data_type' => 'Array',
+ 'options' => [
+ 'preview' => ts('Preview: Display as an example in the "Preview" dialog'),
+ 'phpunit' => ts('PHPUnit: Run basic sniff tests in PHPUnit using this example'),
+ ],
],
[
'name' => 'data',