本文整理汇总了PHP中entity::get_right_relationship方法的典型用法代码示例。如果您正苦于以下问题:PHP entity::get_right_relationship方法的具体用法?PHP entity::get_right_relationship怎么用?PHP entity::get_right_relationship使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entity
的用法示例。
在下文中一共展示了entity::get_right_relationship方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: entity
/**
* Gets the xml metadata so it can be stored with the file in reason-managed mode
* This method grabs the appropriate entitites
* and then uses build_xml_for_av() to actually generate the XML
* @return string XML representation of the av_file entitiy and its related av item
*/
function get_meta_info()
{
$e = new entity($this->manager->get_value('id'));
$av = $e->get_right_relationship('av_to_av_file');
if (!empty($av)) {
$entities = array(current($av), $e);
} else {
$entities = array($e);
}
return $this->build_xml_for_av($entities);
}
示例2: reasonAVDisplay
if ($e->get_value('url')) {
$avd = new reasonAVDisplay();
$embed_markup = $avd->get_embedding_markup($id);
if (empty($embed_markup)) {
$embed_markup = '<a href="' . $e->get_value('url') . '">' . $e->get_value('url') . '</a>';
} else {
$tech_note = $avd->get_tech_note($id);
if (!empty($tech_note)) {
$embed_markup .= '<div class="techNote">' . $tech_note . '</div>' . "\n";
}
}
} else {
$embed_markup = 'Please contact site maintainer for this file (No URL provided)';
}
$GLOBALS['_reason_media_popup_data']['embed_markup'] = $embed_markup;
$rel = $e->get_right_relationship('av_to_av_file');
if ($rel) {
reset($rel);
$rel = current($rel);
$GLOBALS['_reason_media_popup_data']['desc'] = $rel->get_value('description');
$GLOBALS['_reason_media_popup_data']['title'] = $rel->get_value('name');
} else {
$GLOBALS['_reason_media_popup_data']['desc'] = '';
$GLOBALS['_reason_media_popup_data']['title'] = $e->get_value('name');
}
if (defined('MEDIA_POPUP_TEMPLATE_FILENAME')) {
$template_path = 'popup_templates/' . MEDIA_POPUP_TEMPLATE_FILENAME;
} else {
$template_path = 'popup_templates/generic_media_popup_template.php';
}
if (reason_file_exists($template_path)) {