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


PHP Link::all方法代码示例

本文整理汇总了PHP中Link::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Link::all方法的具体用法?PHP Link::all怎么用?PHP Link::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Link的用法示例。


在下文中一共展示了Link::all方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: handler_links_admin

 function handler_links_admin($page)
 {
     if (!S::user()->perms()->hasFlag('admin')) {
         return PL_FORBIDDEN;
     }
     $collec = Link::all();
     $collec->select(LinkSelect::all());
     $results = $collec->split('ns');
     if (Env::has('modify')) {
         $id = Env::i('id');
         $link = $collec->get($id);
         if ($link !== false) {
             if (Env::has('image')) {
                 try {
                     $group = Group::from('partnership');
                     $group->select();
                     $image = new FrankizImage();
                     $image->insert();
                     $image->label($link->label());
                     $image->caste($group->caste('everybody'));
                     $image->image(FrankizUpload::v('image'));
                     $link->image($image);
                 } catch (Exception $e) {
                     $page->assign('err', $e->getMessage());
                 }
             }
             $link->label(Env::t('label'));
             $link->link(Env::t('link'));
             $link->description(Env::t('description'));
             $link->comment(Env::t('comment'));
         } else {
             $err = 'Le lien modifié n\'existe plus.';
             $page->assign('err', $err);
         }
     }
     $page->addCssLink('links.css');
     $page->assign('links', $results);
     $page->assign('title', 'Administrer les liens');
     $page->changeTpl('links/admin_links.tpl');
 }
开发者ID:netixx,项目名称:frankiz,代码行数:40,代码来源:links.php

示例2: links

 /**
  * @before _secure
  * @after _displayData
  */
 public function links()
 {
     $this->seo(array("title" => "Link Logs"));
     $view = $this->getActionView();
     $prop = RM::get("property");
     $val = RM::get("value");
     $sort = RM::get("sort", "desc");
     $sign = RM::get("sign", "equal");
     $orderBy = RM::get("order", 'created');
     $fields = (new \Link())->getColumns();
     $searching = $query = [];
     $query['user_id'] = ['$in' => $this->org->users('publisher')];
     foreach ($fields as $key => $value) {
         $search = RM::get($key);
         if (!$search) {
             continue;
         }
         $searching[$key] = $search;
         // Only allow full object ID's and rest regex searching
         if (in_array($key, ['user_id', 'ad_id', '_id'])) {
             $query[$key] = RM::get($key);
         } else {
             $query[$key] = Utils::mongoRegex($search);
         }
     }
     $dateQuery = Utils::dateQuery(['start' => $this->start, 'end' => $this->end]);
     $query['created'] = ['$gte' => $dateQuery['start'], '$lte' => $dateQuery['end']];
     $records = \Link::all($query, [], $orderBy, $sort, $this->limit, $this->page);
     $count = \Link::count($query);
     $view->set(['links' => $records, 'fields' => $fields, 'property' => $prop, 'value' => $val, 'sign' => $sign, 'sort' => $sort, 'order' => $orderBy, 'count' => $count, 'query' => $searching]);
 }
开发者ID:vNative,项目名称:vnative,代码行数:35,代码来源:report.php

示例3: run

 public function run()
 {
     $collec = Link::all('usefuls');
     $collec->select(LinkSelect::all());
     $this->assign('links', $collec);
 }
开发者ID:netixx,项目名称:frankiz,代码行数:6,代码来源:links.php

示例4: link

 public function link()
 {
     return Link::all();
 }
开发者ID:Jv-Juven,项目名称:opera-1,代码行数:4,代码来源:BaseController.php

示例5: _reportspub

 private function _reportspub($query, $start, $end, $limit, $page)
 {
     $view = $this->getActionView();
     $dateQuery = Utils::dateQuery(['start' => $start, 'end' => $end]);
     $links = \Link::all($query, [], 'created', 'desc', $limit, $page);
     $count = \Link::count($query);
     $query["created"] = Db::dateQuery($start, $end);
     $performances = \Performance::all($query, ['created', 'clicks', 'revenue'], 'created', 'desc');
     $in = [];
     foreach ($links as $l) {
         // only find clicks for the ads whose links are created
         $in[] = Utils::mongoObjectId($l->ad_id);
     }
     // find clicks
     $clickCol = Registry::get("MongoDB")->clicks;
     $records = Db::query('Click', ['adid' => ['$in' => $in], 'is_bot' => false, 'pid' => $query['user_id'], 'created' => $query['created']], ['adid', 'country']);
     $view->set(['limit' => $limit, 'page' => $page, 'count' => $count, 'start' => $start, 'end' => $end, 'links' => $links, 'performances' => $performances, 'clicks' => Click::classify($records, 'adid'), 'commission' => $this->user->commission(), 'dq' => $query['created']]);
 }
开发者ID:vNative,项目名称:vnative,代码行数:18,代码来源:publisher.php

示例6: links

 private function links()
 {
     $class = get_class(new Link());
     $this->log($this->verb . ' Links');
     $url = $this->baseUrl . "facility_link?c:limit=1000";
     $data = $this->getCensusData($url);
     if (!$data) {
         return false;
     }
     // Collection of Eloquent objects from API
     $apiCollection = new Collection();
     foreach ($data->facility_link_list as $link) {
         $values = [];
         $values['name'] = isset($link->description) ? $link->description : null;
         $values['facility_id_a'] = isset($link->facility_id_a) ? $link->facility_id_a : null;
         $values['facility_id_b'] = isset($link->facility_id_b) ? $link->facility_id_b : null;
         $apiCollection->add(new Link($values));
     }
     $links = Link::all();
     $this->addModels($class, $links, $apiCollection);
     $this->deleteModels($class, $links, $apiCollection);
 }
开发者ID:ps2maps,项目名称:ps2maps.com,代码行数:22,代码来源:Census.php


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