本文整理匯總了PHP中entity::has_relation_with_entity方法的典型用法代碼示例。如果您正苦於以下問題:PHP entity::has_relation_with_entity方法的具體用法?PHP entity::has_relation_with_entity怎麽用?PHP entity::has_relation_with_entity使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類entity
的用法示例。
在下文中一共展示了entity::has_relation_with_entity方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
function process_confirm()
{
foreach ($this->admin_page->request['orphan'] as $type_id => $orphans) {
$type_site = htmlspecialchars($this->admin_page->request['type_site_' . $type_id], ENT_QUOTES);
$sites = $this->omi->get_types_to_sites($type_id);
foreach ($orphans as $orphan_id => $action) {
$orphan = new entity($orphan_id);
if (!$orphan->get_owner()) {
if ($action == 'move' && isset($type_site) && array_key_exists($type_site, $sites)) {
if ($orphan->get_value('type') == id_of('minisite_page') && $orphan->has_relation_with_entity($orphan_id)) {
$this->delete_orphan_page_parent($orphan_id);
}
$this->omi->move_into_site($orphan_id, $type_id, $type_site);
$site = $sites[$type_site];
echo 'Moved orphan id ' . $orphan_id . ' into site: ' . $site->get_value('name') . '<br />';
} else {
if ($action == 'delete') {
$this->omi->delete_orphan($orphan_id);
echo 'Deleted orphan id ' . $orphan_id . '<br />';
}
}
}
}
}
}