/** * As the home page of the admin area has no sub nav, this clears the links **/ function __construct() { parent::__construct(); $this->sub_links = array(); $this->sub_links["../content/create"] = "Create New Content"; $this->sub_links["../.."] = "View Site"; }
public function events() { WaxEvent::add("cms.model.columns", function () { $obj = WaxEvent::data(); $obj->scaffold_columns['preview'] = true; }); parent::events(); }
public function edit() { $model = new $this->model_class(WaxUrl::get("id")); $this->possible_parents = array("None"); $remove_ids = array(); foreach ($model->tree() as $section) { $remove_ids[] = $section->id; } //only the subtree of the current node foreach ($this->model->tree() as $section) { //all sections if (!in_array($section->id, $remove_ids)) { $tmp = str_pad("", $section->get_level(), "*", STR_PAD_LEFT); $tmp = str_replace("*", " ", $tmp); $this->possible_parents[$section->id] = $tmp . $section->title; } } parent::edit(); }
public function index() { parent::index(); $this->use_layout = "file"; }
public function controller_global() { $this->model->filter("usergroup <= " . $this->current_user->usergroup); parent::controller_global(); }
/** * delete function - cleans up any preview content for the deleted content * * @return void * @author Sheldon */ public function delete() { $this->model->clear()->filter(array('preview_master_id' => WaxUrl::get("id")))->delete(); parent::delete(); }