本文整理汇总了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;
}