本文整理汇总了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 />';
}
}
}
}
}
}