本文整理汇总了PHP中ElggGroup::getContentAccessMode方法的典型用法代码示例。如果您正苦于以下问题:PHP ElggGroup::getContentAccessMode方法的具体用法?PHP ElggGroup::getContentAccessMode怎么用?PHP ElggGroup::getContentAccessMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ElggGroup
的用法示例。
在下文中一共展示了ElggGroup::getContentAccessMode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testContentAccessMode
public function testContentAccessMode()
{
$unrestricted = ElggGroup::CONTENT_ACCESS_MODE_UNRESTRICTED;
$membersonly = ElggGroup::CONTENT_ACCESS_MODE_MEMBERS_ONLY;
// if mode not set, open groups are unrestricted
$this->assertEqual($this->group->getContentAccessMode(), $unrestricted);
// after first check, metadata is set
$this->assertEqual($this->group->content_access_mode, $unrestricted);
// if mode not set, closed groups are membersonly
$this->group->deleteMetadata('content_access_mode');
$this->group->membership = ACCESS_PRIVATE;
$this->assertEqual($this->group->getContentAccessMode(), $membersonly);
// test set
$this->group->setContentAccessMode($unrestricted);
$this->assertEqual($this->group->getContentAccessMode(), $unrestricted);
$this->group->setContentAccessMode($membersonly);
$this->assertEqual($this->group->getContentAccessMode(), $membersonly);
}