5 use Faker\Provider\Image;
15 public static function image(
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.
if($container instanceof ElggGroup && $container->guid !=elgg_get_page_owner_guid()) $key