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


PHP FD::explorer方法代码示例

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


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

示例1: hook

 /**
  * Service Hook for explorer
  *
  * @since   1.3
  * @access  public
  * @param   string
  * @return
  */
 public function hook()
 {
     // Check for request forgeries
     FD::checkToken();
     // Require the user to be logged in
     FD::requireLogin();
     // Get the event object
     $uid = $this->input->get('uid', 0, 'int');
     $type = $this->input->get('type', '', 'cmd');
     // Load up the explorer library
     $explorer = FD::explorer($uid, $type);
     // Determine if the viewer can really view items
     if (!$explorer->hook('canViewItem')) {
         return $this->view->call(__FUNCTION__);
     }
     // Get the hook
     $hook = $this->input->get('hook', '', 'cmd');
     // Get the result
     $result = $explorer->hook($hook);
     $exception = FD::exception('Folder retrieval successful', SOCIAL_MSG_SUCCESS);
     return $this->view->call(__FUNCTION__, $exception, $result);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:30,代码来源:explorer.php

示例2: display

 public function display($eventId = null, $docType = null)
 {
     // Load up the event
     $event = FD::event($eventId);
     // Only allow event members access here.
     if (!$event->getGuest()->isGuest()) {
         return $this->redirect($event->getPermalink(false));
     }
     // Load up the explorer library.
     $explorer = FD::explorer($event->id, SOCIAL_TYPE_EVENT);
     // Get total number of files that are already uploaded in the event
     $model = FD::model('Files');
     $total = (int) $model->getTotalFiles($event->id, SOCIAL_TYPE_EVENT);
     // Get the access object
     $access = $event->getAccess();
     // Determines if the event exceeded their limits
     $allowUpload = $access->get('files.max') == 0 || $total < $access->get('files.max') ? true : false;
     $uploadLimit = $access->get('files.maxsize');
     $this->set('uploadLimit', $uploadLimit);
     $this->set('allowUpload', $allowUpload);
     $this->set('explorer', $explorer);
     $this->set('event', $event);
     echo parent::display('events/default');
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:24,代码来源:view.html.php

示例3: browser

 /**
  * Renders the file browser
  *
  * @since	1.2
  * @access	public
  * @param	string
  * @return
  */
 public function browser()
 {
     $ajax = FD::ajax();
     $uid = JRequest::getInt('uid');
     $type = JRequest::getCmd('type');
     $url = JRequest::getVar('url');
     // Load up the explorer library
     $explorer = FD::explorer($uid, $type);
     // We need to determine if the user is allowed to access
     if (!$explorer->hook('hasReadAccess')) {
         return $ajax->reject();
     }
     $allowUpload = $explorer->hook('allowUpload');
     $maxSize = $explorer->hook('getMaxSize');
     $html = $explorer->render($url, array('allowUpload' => $allowUpload, 'uploadLimit' => $maxSize));
     return $ajax->resolve($html);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:25,代码来源:view.json.php

示例4: browser

 /**
  * Renders the file browser
  *
  * @since	1.2
  * @access	public
  * @param	string
  * @return
  */
 public function browser()
 {
     $ajax = FD::ajax();
     $uid = JRequest::getInt('uid');
     $type = JRequest::getCmd('type');
     $url = JRequest::getVar('url');
     $controllerName = $this->input->getString('controllerName');
     // Load up the explorer library
     $explorer = FD::explorer($uid, $type);
     // We need to determine if the user is allowed to access
     if (!$explorer->hook('hasReadAccess')) {
         return $ajax->reject();
     }
     $allowUpload = $explorer->hook('allowUpload');
     $maxSize = $explorer->hook('getMaxSize');
     $options = array('allowUpload' => $allowUpload, 'uploadLimit' => $maxSize);
     if (!empty($controllerName)) {
         $options['controllerName'] = $controllerName;
     }
     $html = $explorer->render($url, $options);
     return $ajax->resolve($html);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:30,代码来源:view.ajax.php


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