コード例 #1
0
 /**
  * Custom logic code here for setting placeholders, etc
  * @param array $scriptProperties
  * @return mixed
  */
 public function process(array $scriptProperties = array())
 {
     if (empty($this->scriptProperties['id'])) {
         return $this->failure($this->modx->lexicon('source_err_ns'));
     }
     $this->source = $this->modx->getObject('sources.modMediaSource', $this->scriptProperties['id']);
     if (empty($this->source)) {
         return $this->failure($this->modx->lexicon('source_err_nf'));
     }
     $this->sourceArray = $this->source->toArray();
     $this->getProperties();
     $this->getAccess();
     return array();
 }
コード例 #2
0
ファイル: getlist.class.php プロジェクト: suasti/mxManager
 /**
  * @param modMediaSource $source
  * @return array
  */
 protected function _prepareSourceRow(modMediaSource $source)
 {
     $row = $source->toArray('', true, true);
     $row['type'] = 'source';
     $row['permissions'] = array('view' => true, 'create' => true);
     return $row;
 }