当前位置: 首页>>代码示例>>PHP>>正文


PHP FabrikWorker::readImages方法代码示例

本文整理汇总了PHP中FabrikWorker::readImages方法的典型用法代码示例。如果您正苦于以下问题:PHP FabrikWorker::readImages方法的具体用法?PHP FabrikWorker::readImages怎么用?PHP FabrikWorker::readImages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FabrikWorker的用法示例。


在下文中一共展示了FabrikWorker::readImages方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onAjax_files

 /**
  * On Ajax files
  *
  * @return  void
  */
 public function onAjax_files()
 {
     $this->loadMeForAjax();
     $folder = $this->app->input->get('folder', '', 'string');
     if (!strstr($folder, JPATH_SITE)) {
         $folder = JPATH_SITE . '/' . $folder;
     }
     $pathA = JPath::clean($folder);
     $folder = array();
     $files = array();
     $images = array();
     FabrikWorker::readImages($pathA, "/", $folders, $images, $this->ignoreFolders);
     if (!array_key_exists('/', $images)) {
         $images['/'] = array();
     }
     echo json_encode($images['/']);
 }
开发者ID:LGBGit,项目名称:tierno,代码行数:22,代码来源:image.php

示例2: readImages

 /**
  * Internal function to recursive scan directories
  * @param string Path to scan
  * @param string root path of this folder
  * @param array  Value array of all existing folders
  * @param array  Value array of all existing images
  * @param bol make options out for the results
  */
 public function readImages($imagePath, $folderPath, &$folders, &$images, $aFolderFilter, $makeOptions = true)
 {
     $imgFiles = FabrikWorker::fabrikReadDirectory($imagePath, '.', false, false, $aFolderFilter);
     foreach ($imgFiles as $file) {
         $ff_ = $folderPath . $file . '/';
         $ff = $folderPath . $file;
         $i_f = $imagePath . '/' . $file;
         if (is_dir($i_f) && $file != 'CVS' && $file != '.svn') {
             if (!in_array($file, $aFolderFilter)) {
                 $folders[] = JHTML::_('select.option', $ff_);
                 FabrikWorker::readImages($i_f, $ff_, $folders, $images, $aFolderFilter);
             }
         } else {
             if (preg_match('/bmp|gif|jpg|png/i', $file) && is_file($i_f)) {
                 // leading / we don't need
                 $imageFile = substr($ff, 1);
                 $images[$folderPath][] = $makeOptions ? JHTML::_('select.option', $imageFile, $file) : $file;
             }
         }
     }
 }
开发者ID:romuland,项目名称:khparts,代码行数:29,代码来源:parent.php

示例3: getAdminLists

 /**
  *
  */
 function getAdminLists(&$lists)
 {
     /**
      * IMPORTANT NOTE FOR HACKERS!
      * 	if your images folder contains massive sub directories which you dont want fabrik
      * accessing (and hance slowing down to a crawl the loading of this page)
      * then put the folders in the $ignoreFolders array
      */
     $params = $this->getParams();
     $images = array();
     $folders = array();
     $path = $params->get('imagepath', '/');
     $file = $params->get('imagefile');
     $folders[] = JHTML::_('select.option', '/', '/');
     FabrikWorker::readImages(JPATH_SITE, "/", $folders, $images, $this->ignoreFolders);
     $lists['folders'] = JHTML::_('select.genericlist', $folders, 'params[imagepath]', 'class="inputbox" size="1" ', 'value', 'text', $path);
     $javascript = "onchange=\"previewImage()\" onfocus=\"previewImage()\"";
     $is = JArrayHelper::getValue($images, $path, array());
     $lists['imagefiles'] = JHTML::_('select.genericlist', $is, 'params[imagefile]', 'class="inputbox" size="10" multiple="multiple" ' . $javascript, 'value', 'text', $file);
     $defRootFolder = $params->get('selectImage_root_folder', '');
     $lists['selectImage_root_folder'] = JHTML::_('select.genericlist', $folders, 'params[selectImage_root_folder]', "class=\"inputbox\"  size=\"1\" ", 'value', 'text', $defRootFolder);
 }
开发者ID:rhotog,项目名称:fabrik,代码行数:25,代码来源:image.php


注:本文中的FabrikWorker::readImages方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。