Get the images to load for a selected folder.

@return mixed
327084
public function getItems()
    {
        return [
            'items' => array_map(function ($item) {
                return $item->fill()->attributes;
            }, array_merge($this->lfm->folders(), $this->lfm->files())),
            'display' => $this->helper->getDisplayMode(),
            'working_dir' => $this->lfm->path('working_dir'),
        ];
    }
1298672
public function image() {
        $this->check_role = 'image';
        if ($this->value instanceof File) {
            $result = in_array($this->getImageType($this->value->path_tmp), [1, 2, 3, 6]);
        } else {
            $result = in_array($this->getImageType($this->value), [1, 2, 3, 6]);
        }
        $this->checkResult($result);
        return $this;
    }
537107
public function enaImageFiles()
    {
        $properties = $this->getProperties();
        $extString  = (!empty($properties['acceptedFiles'])) ? $properties['acceptedFiles'] : '';
        $imagExts   = $this->getImageExtensionConstant();
        foreach ($imagExts as $imagExt) {
            if (in_array($imagExt, $extString) === false) {
                $extString[] = $imagExt;
            }
        }
        $properties                     = $this->getProperties();
        $properties['acceptedFiles']    = $extString;
        $this->setProperties($properties);
        return $this;
    }
107878
public function actionDataFolders()
    {
        return $this->getOrSetHasCache('storageApiDataFolders', function () {
            $folders = [];
            foreach (Yii::$app->storage->findFolders() as $key => $folder) {
                $folders[$key] = $folder->toArray();
                $folders[$key]['toggle_open'] = (int) Yii::$app->adminuser->identity->setting->get('foldertree.'.$folder->id);
                $folders[$key]['subfolder'] = Yii::$app->storage->getFolder($folder->id)->hasChild();
            }
            return $folders;
        }, 0, new DbDependency(['sql' => 'SELECT MAX(id) FROM {{%admin_storage_folder}} WHERE is_deleted=false']));
    }
651368
public function getTypes()
    {
        //Gets the folders list
        list($folders) = (new Folder(UPLOADED))->read(true, true);

        //Each folder is a file type supported by KCFinder
        foreach ($folders as $type) {
            $types[$type] = '';
        }

        //Adds the "images" type by default
        $types['images'] = '*img';

        return $types;
    }
638792
protected function loadIconListing()
    {
        $icons = json_decode(file_get_contents($this->currentSelection));
        $icons = $icons->icons;
        usort($icons, array($this, 'sortIconListing'));
        return $icons;
    }
1270045
public function getImage()
    {
        $value = parent::getValue();
        
        if ($value) {
            return Yii::$app->storage->getImage($value);
        }
        
        return false;
    }
1247062
protected function getImages()
    {
        $table = ORM::getTable($this->getTable()->getPlugin(), 'Image');
        $q = $table->createSelectQuery();
        $q->where(
            $q->expr->lAnd(
                $q->expr->eq('groupId', $q->bindValue($this->id, null, PDO::PARAM_INT)),
                $q->expr->eq('active', $q->bindValue(true, null, PDO::PARAM_BOOL))
            )
        );
        $q->orderBy('position');
        return $table->loadFromQuery($q);
    }
638161
public function getData()
    {
        $data   = [];
        $path   = $this->getPath();
        $dir    = new Folder($path);
        $files  = (array) $dir->find('.*\.php');

        if (count($files) > 0) {
            foreach ($files as $file) {
                $name     = FS::filename($file);
                $segments = explode('_', $name);
                $version  = array_shift($segments);
                $class    = Inflector::camelize(implode('_', $segments));

                $data[$version] = [
                    'class' => $class,
                    'path'  => $path . DS . $file
                ];
            }
        }

        return $data;
    }
322567
public function getPictureDir()
    {
        if (($sValue = $this->getViewConfigParam('picturedir')) === null) {
            $sValue = $this->getConfig()->getPictureUrl(null, $this->isAdmin());
            $this->setViewConfigParam('picturedir', $sValue);
        }

        return $sValue;
    }
1362045
public function toArray()
    {
        return [
            'folderId' => $this->folder->getId(),
            'usageType' => $this->usageType,
            'usageId' => $this->usageId,
            'status' => $this->status,
        ];
    }
121929
public function load()
    {
        $data = [];

        if (is_file($this->filePath)) {
            $data = json_decode(file_get_contents($this->filePath), true);
        }

        return $data;
    }
1305442
public static function getFiles()
    {
        if (self::$_files === null) {
            self::$_files = [];
            if (isset($_FILES) && is_array($_FILES)) {
                foreach ($_FILES as $class => $info) {
                    self::getUploadFilesRecursive($class, $info['name'], $info['error']);
                }
            }
        }
        return self::$_files;
    }
225042
public function getImage()
    {
        // No fields, no image.
        if (empty($this->contenttype['fields'])) {
            return '';
        }

        // Grab the first field of type 'image', and return that.
        foreach ($this->contenttype['fields'] as $key => $field) {
            if ($field['type'] === 'image' && isset($this->values[$key])) {
                // After v1.5.1 we store image data as an array
                if (is_array($this->values[$key])) {
                    return isset($this->values[$key]['file']) ? $this->values[$key]['file'] : '';
                }

                return $this->values[$key];
            }
        }

        // otherwise, no image.
        return '';
    }
1067393
public function getFiles()
    {
        $files = get_included_files();

        if (class_exists('\O2System\Framework', false)) {
            foreach ($files as $key => $file) {

                if (strpos($file, 'autoload.php') !== false) {
                    unset($files[ $key ]);
                    continue;
                }

                $files[ $key ] = str_replace(PATH_ROOT, DIRECTORY_SEPARATOR, $file);
            }
        }

        return $files;
    }
1276871
public function photos()
    {
        $links[] = [__d('me_cms', 'List photos'), [
            'controller' => 'Photos',
            'action' => 'index',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];
        $links[] = [__d('me_cms', 'Upload photos'), [
            'controller' => 'Photos',
            'action' => 'upload',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];
        $links[] = [__d('me_cms', 'List albums'), [
            'controller' => 'PhotosAlbums',
            'action' => 'index',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];
        $links[] = [__d('me_cms', 'Add album'), [
            'controller' => 'PhotosAlbums',
            'action' => 'add',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        return [$links, I18N_PHOTOS, ['icon' => 'camera-retro']];
    }
962682
public function getData()
    {
        if ( $this->ContentObjectAttribute->hasContent() )
        {
            $imageAliasHandler = $this->ContentObjectAttribute->attribute( 'content' );
            $imageAlias = $imageAliasHandler->imageAlias( 'opengraph' );

            if ( $imageAlias['is_valid'] == 1 )
            {
                return eZSys::serverURL() . '/' . $imageAlias['full_path'];
            }
        }

        return eZSys::serverURL() . eZURLOperator::eZImage( null, 'opengraph_default_image.png', '' );
    }