Example #1
0
 /**
  * Adds content info to $result so that merged content can be edited.
  * @param array $result
  * @param array $content
  */
 public function mergeContentInfo(&$result, $content)
 {
     parent::mergeContentInfo($result, $content);
     if (!isset($content['items'])) {
         throw new vB_Exception_Api('invalid_content_info');
     }
     foreach ($content['items'] as $video) {
         $result['items'][] = $video;
     }
 }
Example #2
0
 /**
  * Adds content info to $result so that merged content can be edited.
  * @param array $result
  * @param array $content
  */
 public function mergeContentInfo(&$result, $content)
 {
     parent::mergeContentInfo($result, $content);
     if (!isset($content['photo'])) {
         throw new vB_Exception_Api('invalid_content_info');
     }
     foreach ($content['photo'] as $photo) {
         $result['photo'][$photo['nodeid']] = $photo;
     }
     $result['photocount'] = count($result['photo']);
 }
Example #3
0
 /**
  * Adds content info to $result so that merged content can be edited.
  * @param array $result
  * @param array $content
  */
 public function mergeContentInfo(&$result, $content)
 {
     parent::mergeContentInfo($result, $content);
     $fields = array('title', 'options', 'timeout', 'timeoutstr', 'multiple', 'public');
     $missing = array_diff($fields, array_keys($content));
     if (!empty($missing)) {
         throw new vB_Exception_Api('invalid_content_info');
     }
     foreach ($fields as $field) {
         $result[$field] = $content[$field];
     }
 }
Example #4
0
 /**
  * Adds content info to $result so that merged content can be edited.
  * @param array $result
  * @param array $content
  */
 public function mergeContentInfo(&$result, $content)
 {
     parent::mergeContentInfo($result, $content);
     $fields = array('filedataid', 'url', 'url_title', 'meta');
     $missing = array_diff($fields, array_keys($content));
     if (!empty($missing)) {
         throw new vB_Exception_Api('invalid_content_info');
     }
     foreach ($fields as $field) {
         $result[$field] = $content[$field];
     }
 }