. * --------------------------------------------------------------------- */ if (!defined('GLPI_ROOT')) { die("Sorry. You can't access this file directly"); } /** * SolutionTemplate Class **/ class SolutionTemplate extends CommonDropdown { // From CommonDBTM public $dohistory = true; static $rightname = 'solutiontemplate'; public $can_be_translated = false; static function getTypeName($nb = 0) { return _n('Solution template', 'Solution templates', $nb); } function getAdditionalFields() { return [['name' => 'solutiontypes_id', 'label' => SolutionType::getTypeName(1), 'type' => 'dropdownValue', 'list' => true], ['name' => 'content', 'label' => __('Content'), 'type' => 'tinymce']]; } function rawSearchOptions() { $tab = parent::rawSearchOptions(); $tab[] = [ 'id' => '4', 'name' => __('Content'), 'field' => 'content', 'table' => $this->getTable(), 'datatype' => 'text', 'htmltext' => true ]; $tab[] = [ 'id' => '3', 'name' => SolutionType::getTypeName(1), 'field' => 'name', 'table' => getTableForItemType('SolutionType'), 'datatype' => 'dropdown' ]; return $tab; } }