本文整理汇总了PHP中Area::getAreaCollectionObject方法的典型用法代码示例。如果您正苦于以下问题:PHP Area::getAreaCollectionObject方法的具体用法?PHP Area::getAreaCollectionObject怎么用?PHP Area::getAreaCollectionObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area::getAreaCollectionObject方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBlockTypeAliasAction
/**
* gets the form post action for the current block type given the area
* @param Area $a
* @return string
*/
public function getBlockTypeAliasAction(&$a) {
$step = ($_REQUEST['step']) ? '&step=' . $_REQUEST['step'] : '';
$arHandle = urlencode($a->getAreaHandle());
$c = $a->getAreaCollectionObject();
$cID = $c->getCollectionID();
$str = DIR_REL . "/" . DISPATCHER_FILENAME . "?cID={$cID}&areaName={$arHandle}&mode=edit&btask=alias" . $step . '&' . $valt->getParameter();
return $str;
}
示例2: setAreaPermissions
/**
* sets the permissions on the area??
* @todo Documnetation?? not sure what type $cp is or how this is used?
* @param Area $area
* @param unknown $cp
*/
function setAreaPermissions(&$area, &$cp)
{
$db = Loader::db();
if ($area->overrideCollectionPermissions()) {
$setBlocksVia = "AREA";
} else {
if ($area->getAreaCollectionInheritID() > 0) {
// see if the area/page we're supposed to be getting these from actually has a record
$arOverrideCollectionPermissions = $db->getOne("select arOverrideCollectionPermissions from Areas where cID = ? and arHandle = ?", array($area->getAreaCollectionInheritID(), $area->getAreaHandle()));
if ($arOverrideCollectionPermissions) {
$setBlocksVia = "AREA";
}
}
if (!isset($setBlocksVia)) {
$setBlocksVia = "PAGE";
}
}
if ($setBlocksVia == "AREA") {
$c = $area->getAreaCollectionObject();
$cpID = $area->getAreaCollectionInheritID() > 0 ? $area->getAreaCollectionInheritID() : $c->getCollectionID();
$v = array($cpID, $area->getAreaHandle(), $this->getBlockTypeID());
$q = "select uID, gID from AreaGroupBlockTypes where cID = ? and arHandle = ? and btID = ?";
$r = $db->query($q, $v);
while ($row = $r->fetchRow()) {
if ($row['uID'] != 0) {
$this->addBTUArray[] = $row['uID'];
}
if ($row['gID'] != 0) {
$this->addBTGArray[] = $row['gID'];
}
}
} else {
$cID = $area->getCollectionID();
// we grab all the uID/gID combos from PagePermissions that can edit the page
// then we allow them to add all the blocks they want
$cInheritCID = $db->getOne('select cInheritPermissionsFromCID from Pages where cID = ?', array($cID));
$v = array($cInheritCID);
$q = "select uID, gID, cgPermissions from PagePermissions where cID = ?";
$r = $db->query($q, $v);
while ($row = $r->fetchRow()) {
if ($row['uID'] != 0 && strpos($row['cgPermissions'], 'wa') !== false) {
$this->addBTUArray[] = $row['uID'];
}
if ($row['gID'] != 0 && strpos($row['cgPermissions'], 'wa') !== false) {
$this->addBTGArray[] = $row['gID'];
}
}
}
}