Updates to Module administration
This commit is contained in:
@@ -29,6 +29,16 @@ class Model_Module_Method extends ORM_OSB {
|
||||
'name'=>'ASC',
|
||||
);
|
||||
|
||||
protected $status;
|
||||
|
||||
public function controller() {
|
||||
return Kohana::classname(sprintf('Controller%s_%s',($this->directory() ? '_' : '').$this->directory(),$this->module->name));
|
||||
}
|
||||
|
||||
public function directory() {
|
||||
return substr($this->name,0,strpos($this->name,'_'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the description for this method on any menu link
|
||||
*/
|
||||
@@ -40,6 +50,17 @@ class Model_Module_Method extends ORM_OSB {
|
||||
return sprintf('%s: %s',$this->module->name,$this->name);
|
||||
}
|
||||
|
||||
public function method() {
|
||||
return substr($this->name,strpos($this->name,'_')+1);
|
||||
}
|
||||
|
||||
public function status($status=NULL) {
|
||||
if ($status)
|
||||
$this->status = $status;
|
||||
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
public function url() {
|
||||
if (! preg_match('/_/',$this->name))
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user