本文整理汇总了PHP中ca_objects::primaryKey方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_objects::primaryKey方法的具体用法?PHP ca_objects::primaryKey怎么用?PHP ca_objects::primaryKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca_objects
的用法示例。
在下文中一共展示了ca_objects::primaryKey方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetMediaInfo
/**
* Returns content for overlay containing details for media attribute
*
* Expects the following request parameters:
* value_id = the id of the attribute value (ca_attribute_values) record to display
*
* Optional request parameters:
* version = The version of the representation to display. If omitted the display version configured in media_display.conf is used
*
*/
public function GetMediaInfo()
{
$pn_representation_id = $this->request->getParameter('representation_id', pInteger);
$pn_value_id = $this->request->getParameter('value_id', pInteger);
if ($pn_value_id) {
$t_rep = new ca_object_representations();
$t_attr_val = new ca_attribute_values($pn_value_id);
$t_attr = new ca_attributes($t_attr_val->get('attribute_id'));
$t_subject = $this->opo_datamodel->getInstanceByTableNum($t_attr->get('table_num'), true);
$t_subject->load($t_attr->get('row_id'));
$va_rep_display_info = caGetMediaDisplayInfo('media_overlay', $t_attr_val->getMediaInfo('value_blob', 'INPUT', 'MIMETYPE'));
// check subject_id here
$va_opts = array('t_attribute_value' => $t_attr_val, 'display' => 'media_overlay', 't_subject' => $t_subject, 'containerID' => 'caMediaPanelContentArea');
if (strlen($vs_use_book_viewer = $this->request->getParameter('use_book_viewer', pInteger))) {
$va_opts['use_book_viewer'] = (bool) $vs_use_book_viewer;
}
$this->response->addContent(caGetMediaViewerHTMLBundle($this->request, $va_opts));
} elseif ($pn_representation_id) {
$t_rep = new ca_object_representations($pn_representation_id);
$t_subject = new ca_objects($vn_subject_id = $this->request->getParameter('object_id', pInteger));
if (!$vn_subject_id) {
if (is_array($va_subject_ids = $t_rep->get($t_subject->tableName() . '.' . $t_subject->primaryKey(), array('returnAsArray' => true))) && sizeof($va_subject_ids)) {
$vn_subject_id = array_shift($va_subject_ids);
} else {
$this->postError(1100, _t('Invalid object/representation'), 'ObjectEditorController->GetRepresentationInfo');
return;
}
}
$va_opts = array('display' => 'media_overlay', 't_subject' => $t_subject, 't_representation' => $t_rep, 'containerID' => 'caMediaPanelContentArea');
if (strlen($vs_use_book_viewer = $this->request->getParameter('use_book_viewer', pInteger))) {
$va_opts['use_book_viewer'] = (bool) $vs_use_book_viewer;
}
$this->response->addContent(caGetMediaViewerHTMLBundle($this->request, $va_opts));
} else {
//
}
//$pn_value_id = $this->request->getParameter('value_id', pInteger);
//$this->response->addContent(caGetMediaViewerHTMLBundle($this->request, array('display' => 'media_overlay', 't_attribute_value' => $pn_value_id, 'containerID' => 'caMediaPanelContentArea')));
}