private static function __faqs_add_edit_form($data = NULL) { $categories = new FaqCategoryEntityRepository(); return CmsFormHelper::outputForm(ModuleFaq::$tables['faq'], ['action' => '?p=' . P . '&do=_add', 'button' => 'Add', 'data' => $data, 'fields' => ['category_id' => ['title' => 'Category', 'options' => $categories->getPairs('title')], 'title' => ['translation' => true], 'text' => ['translation' => true, 'type' => 'textarea', 'edit' => 'wysiwyg']]]); }
/** * @return array */ public static function getCategoryPairs() { $categories = new FaqCategoryEntityRepository(); return $categories->getPairs('title'); }