27 if (empty($local_folder) || !is_dir($local_folder)) {
28 return parent::image($dir, $width, $height, $category, $fullPath, $randomize, $word,
$format);
34 $dir = new \DirectoryIterator($local_folder);
36 foreach ($dir as $file) {
37 if (!$file->isFile()) {
41 $files[] = $file->getRealPath();
45 return parent::image($dir, $width, $height, $category, $fullPath, $randomize, $word,
$format);
49 $key = array_rand($files);
Provide images from a local folder for seeding.
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
static image($dir=null, $width=640, $height=480, $category=null, $fullPath=true, $randomize=true, $word=null, $gray=false, $format= 'png')
{}
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key