当前位置: 首页>>代码示例>>PHP>>正文


PHP ca_objects::primaryKey方法代码示例

本文整理汇总了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')));
 }
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:49,代码来源:DetailController.php


注:本文中的ca_objects::primaryKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。