本文整理匯總了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;
}
示例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;
}
示例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();
}
示例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();
}
示例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;
}