當前位置: 首頁>>代碼示例>>PHP>>正文


PHP modMediaSource::getWorkingContext方法代碼示例

本文整理匯總了PHP中modMediaSource::getWorkingContext方法的典型用法代碼示例。如果您正苦於以下問題:PHP modMediaSource::getWorkingContext方法的具體用法?PHP modMediaSource::getWorkingContext怎麽用?PHP modMediaSource::getWorkingContext使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在modMediaSource的用法示例。


在下文中一共展示了modMediaSource::getWorkingContext方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getSource

 /**
  * Get the active Source
  * @return modMediaSource|boolean
  */
 public function getSource()
 {
     $this->modx->loadClass('sources.modMediaSource');
     $this->source = modMediaSource::getDefaultSource($this->modx, $this->getProperty('source'));
     if (empty($this->source) || !$this->source->getWorkingContext()) {
         return false;
     }
     return $this->source;
 }
開發者ID:ChrstnMgcn,項目名稱:revolution,代碼行數:13,代碼來源:getlist.class.php

示例2: getSource

 /**
  * Get the active Source
  * @return modMediaSource|boolean
  */
 public function getSource()
 {
     $this->modx->loadClass('sources.modMediaSource');
     $this->source = $this->modx->getObject('modMediaSource', $_POST['sourceID']);
     if (empty($this->source) || !$this->source->getWorkingContext()) {
         return false;
     }
     return $this->source;
 }
開發者ID:neonoviy,項目名稱:CET_AssetsTV,代碼行數:13,代碼來源:upload.class.php

示例3: getSource

 /**
  * @return boolean|string
  */
 public function getSource()
 {
     /** @var modMediaSource $source */
     $this->modx->loadClass('sources.modMediaSource');
     $this->source = $this->modx->getObject('modMediaSource', $_POST['sourceID']);
     if (!$this->source->getWorkingContext()) {
         return $this->modx->lexicon('permission_denied');
     }
     $this->source->setRequestProperties($this->getProperties());
     return $this->source->initialize();
 }
開發者ID:neonoviy,項目名稱:CET_AssetsTV,代碼行數:14,代碼來源:remove.class.php

示例4: getSource

 /**
  * @return boolean|string
  */
 public function getSource()
 {
     $source = $this->getProperty('source', 1);
     /** @var modMediaSource $source */
     $this->modx->loadClass('sources.modMediaSource');
     $this->source = modMediaSource::getDefaultSource($this->modx, $source);
     if (!$this->source->getWorkingContext()) {
         return $this->modx->lexicon('permission_denied');
     }
     $this->source->setRequestProperties($this->getProperties());
     return $this->source->initialize();
 }
開發者ID:ChrstnMgcn,項目名稱:revolution,代碼行數:15,代碼來源:update.class.php

示例5: getSource

 /**
  * Get the source to load the paths from
  * 
  * @param int $sourceId
  * @return modMediaSource|modFileMediaSource
  */
 public function getSource($sourceId)
 {
     /** @var modMediaSource|modWebDAVMediaSource $source */
     $this->modx->loadClass('sources.modMediaSource');
     $this->source = modMediaSource::getDefaultSource($this->modx, $sourceId, false);
     if (empty($this->source)) {
         return false;
     }
     if (!$this->source->getWorkingContext()) {
         return false;
     }
     $this->source->setRequestProperties($this->getProperties());
     $this->source->initialize();
     return $this->source;
 }
開發者ID:Burick,項目名稱:modx-WebDAV,代碼行數:21,代碼來源:proxy.class.php


注:本文中的modMediaSource::getWorkingContext方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。