1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41:
<?php
class RootCategory extends Category
{
public function __construct()
{
$this->set_id(self::ROOT_CATEGORY);
$this->set_id_parent(self::ROOT_CATEGORY);
$this->set_name(LangLoader::get_message('root', 'main'));
$this->set_rewrited_name('root');
$this->set_order(0);
}
public static function get_authorizations_settings()
{
$common_lang = LangLoader::get('common');
return array(
new ActionAuthorization($common_lang['authorizations.read'], Category::READ_AUTHORIZATIONS),
new VisitorDisabledActionAuthorization($common_lang['authorizations.write'], Category::WRITE_AUTHORIZATIONS),
new VisitorDisabledActionAuthorization($common_lang['authorizations.contribution'], Category::CONTRIBUTION_AUTHORIZATIONS),
new MemberDisabledActionAuthorization($common_lang['authorizations.moderation'], Category::MODERATION_AUTHORIZATIONS),
new MemberDisabledActionAuthorization($common_lang['authorizations.categories_management'], Category::CATEGORIES_MANAGEMENT_AUTHORIZATIONS)
);
}
}
?>