Example #1
0
 /**
  * This code returns a grid for editing WYSIWYG content.
  * @return type
  */
 function getContentEditor()
 {
     $DEB = Ruth::getObject("DEB");
     $buttons = "update,delete";
     $buttons = "update,delete";
     $toolBar["caption"] = "Content";
     $customFields["TITLE"] = ["validation" => "required:true"];
     $customFields["DESCRIPTION"] = ["type" => "text"];
     $customFields["IMAGE_PATH"] = ["type" => "text", "validation" => "required:false"];
     $customFields["CONTENT"] = ["type" => "custom", "call" => "(new Kim())->getEditor"];
     $customFields["STATUS"] = ["type" => "lookup", "list" => ["Active" => "Active", "Disabled" => "Disabled"]];
     $customFields["ORDER_INDEX"] = ["validation" => "required:true", "defaultValue" => 100];
     $tableInfo = ["table" => "content", "primarykey" => "content_id"];
     $html = (new Cody())->bootStrapTable($sql = "select content_id, title, description from content order by order_index", $buttons, $hideColumns = "", $toolBar, $customFields, "Content", $tableInfo, $formHideColumns = "content_id");
     return $html;
 }