FEATURE: add info about not-set homepage into contents overview
This commit is contained in:
@@ -88,6 +88,42 @@ class Content extends Model
|
||||
return $this->subpages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is current content draft?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isDraft() {
|
||||
return $this->status == self::STATUS_DRAFT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is current content visible for all visitors?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isPublic() {
|
||||
return $this->status == self::STATUS_PUBLIC;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is current content visible only for logged users?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isProtected() {
|
||||
return $this->status == self::STATUS_PROTECTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is current content visible for logged user OR for everyone?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isVisible() {
|
||||
return $this->isPublic() || $this->isProtected();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns list of all root pages - those pages, which parent_id is null
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user