Ejemplo n.º 1
0
 /**
  * Target directory setter. Adds directory to be scanned
  *
  * @param string
  * @return self
  */
 public function addTargetDir($value)
 {
     if (!Mage::helper('uaudio_storage')->isEnabled()) {
         return parent::addTargetDir($value);
     }
     $value = (string) $value;
     $this->_targetDirs[$value] = $value;
 }
Ejemplo n.º 2
0
 /**
  * Return list of existing widget image placeholders
  *
  * @return array
  */
 public function getAvailablePlaceholderFilenames()
 {
     $result = array();
     $targetDir = $this->getPlaceholderImagesBaseDir();
     if (is_dir($targetDir) && is_readable($targetDir)) {
         $collection = new Varien_Data_Collection_Filesystem();
         $collection->addTargetDir($targetDir)->setCollectDirs(false)->setCollectFiles(true)->setCollectRecursively(false);
         foreach ($collection as $file) {
             $result[] = $file->getBasename();
         }
     }
     return $result;
 }