public function addGroupWriteAccess(a\Group $g) { if (self::DEBUG) { u\DebugUtility::out("Granting write access to " . $g->getName()); } $this->setAccess($g, c\T::WRITE); return $this; }
public function addGroupToSendReport(Group $g) { if ($g == NULL) { throw new e\NullAssetException(S_SPAN . c\M::NULL_GROUP . E_SPAN); } $g_name = $g->getName(); $group_string = $this->getProperty()->sendReportToGroups; $group_array = explode(';', $group_string); if (!in_array($g_name, $group_array)) { $group_array[] = $g_name; } $group_string = implode(';', $group_array); $this->getProperty()->sendReportToGroups = $group_string; return $this; }
public function addGroup(a\Group $g) { if ($g == NULL) { throw new e\NullAssetException(S_SPAN . c\M::NULL_GROUP . E_SPAN); } $g_name = $g->getName(); $group_array = explode(self::DELIMITER, $this->groups); $temp = array(); foreach ($group_array as $group) { if ($group != "") { $temp[] = $group; } } $group_array = $temp; if (!in_array($g_name, $group_array)) { $group_array[] = $g_name; } $this->groups = implode(self::DELIMITER, $group_array); return $this; }
public function removeGroup(Group $g) { if ($g == NULL) { throw new e\NullAssetException(S_SPAN . c\M::NULL_GROUP . E_SPAN); } $group_name = $g->getName(); $group_string = $this->getProperty()->applicableGroups; $group_array = explode(';', $group_string); if (in_array($group_name, $group_array)) { $temp = array(); foreach ($group_array as $group) { if ($group != $group_name) { $temp[] = $group; } } $group_array = $temp; } $group_string = implode(';', $group_array); $this->getProperty()->applicableGroups = $group_string; return $this; }
public function setDefaultGroup(Group $group = NULL) { if (isset($group)) { $this->getProperty()->defaultGroup = $group->getName(); } return $this; }
public function removeGroup(Group $g) { if ($g == NULL) { throw new e\NullAssetException(S_SPAN . c\M::NULL_GROUP . E_SPAN); } $group_name = $g->getName(); $group_array = explode(self::DELIMITER, $this->getProperty()->applicableGroups); $temp = array(); foreach ($group_array as $group) { if ($group != $group_name) { $temp[] = $group; } } $this->getProperty()->applicableGroups = implode(self::DELIMITER, $temp); return $this; }