本文整理汇总了PHP中Arr::videoAdUrls方法的典型用法代码示例。如果您正苦于以下问题:PHP Arr::videoAdUrls方法的具体用法?PHP Arr::videoAdUrls怎么用?PHP Arr::videoAdUrls使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Arr
的用法示例。
在下文中一共展示了Arr::videoAdUrls方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: json_video_tag
public function json_video_tag($id)
{
$ads = Arr::videoAdUrls();
$m = $this->json_file_request($id);
$pre = false;
$post = false;
if (array_key_exists($m['preroll'], $ads)) {
$pre = $this->adRequest($ads[$m['preroll']]);
}
if (array_key_exists($m['postroll'], $ads)) {
$post = $this->adRequest($ads[$m['postroll']]);
}
$this->set(compact("pre", "post"));
}
示例2: mediaFileDiv
public function mediaFileDiv($content = '', $dataSet = array(), $options = array())
{
ClassRegistry::init("MediaFile");
$m = $dataSet['MediaFile'];
$d = false;
$opt = array();
$allowed = array("id", "preroll", "postroll", "media_type");
$ads = Arr::videoAdUrls(false);
$adLabels = Arr::adLabels();
$m = MediaFile::formatVideoAdUrls($m);
if ($dataSet['Dailyop']) {
//$opt['Dailyop'] = $dataSet['Dailyop'];
$opt['dailyop_id'] = $options['dailyop_id'] = $dataSet['Dailyop']['id'];
}
foreach ($m as $k => $v) {
if (in_array($k, $allowed)) {
$opt['MediaFile'][$k] = $v;
}
}
$options['media_file'] = json_encode($opt);
$options['media_type'] = $m['media_type'];
$options['media_file_id'] = $m['id'];
$options['slide_show'] = $dataSet['Dailyop']['slide_show'];
$options['dailyop_section_id'] = $dataSet['Dailyop']['dailyop_section_id'];
$options['publish_date'] = $dataSet['Dailyop']['publish_date'];
//new parameters
//dailyops id
isset($dataSet['Dailyop']['id']) ? $options['dailyop_id'] = $dataSet['Dailyop']['id'] : '';
//pass in the session
$options['xid'] = CakeSession::id();
return $this->Html->div("dailyop_media_item", $content, $options);
}