| 1 |
<?php |
| 2 |
|
| 3 |
namespace Photonic_Plugin\Lightboxes; |
| 4 |
|
| 5 |
use Photonic_Plugin\Platforms\Base; |
| 6 |
|
| 7 |
require_once 'Lightbox.php'; |
| 8 |
|
| 9 |
class PrettyPhoto extends Lightbox { |
| 10 |
protected function __construct() { |
| 11 |
$this->library = 'prettyphoto'; |
| 12 |
parent::__construct(); |
| 13 |
} |
| 14 |
|
| 15 |
/** |
| 16 |
* @param $rel_id |
| 17 |
* @param Base $module |
| 18 |
* @return array |
| 19 |
*/ |
| 20 |
public function get_gallery_attributes($rel_id, Base $module): array { |
| 21 |
$rel = 'lightbox-photonic-' . $module->provider . '-stream-' . (empty($rel_id) ? $module->gallery_index : $rel_id); |
| 22 |
return [ |
| 23 |
'class' => $this->class, |
| 24 |
'rel' => ["photonic-prettyPhoto[$rel]"], |
| 25 |
'specific' => [], |
| 26 |
]; |
| 27 |
} |
| 28 |
} |
| 29 |
|