PluginProbe
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 4.2.3
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v4.2.3
4.7.2 4.7.1 4.7.0 4.6.6 4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.1 4.5.0 4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 All 281 releases
surecart / app / src / Models / GalleryItemMedia.php
GalleryItemMedia.php
47 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace SureCart\Models;
3
4 use SureCart\Models\GalleryItem as ModelsGalleryItem;
5 use SureCart\Support\Contracts\GalleryItem;
6
7 /**
8 * Gallery item model
9 */
10 class GalleryItemMedia extends ModelsGalleryItem implements GalleryItem {
11 /**
12 * Create a new gallery item.
13 * This can accept a product media or a post.
14 *
15 * @param \SureCart\Models\Media $item The item.
16 *
17 * @return void
18 */
19 public function __construct( \SureCart\Models\Media $item ) {
20 $this->item = $item;
21 }
22
23 /**
24 * Get the media attribute markup.
25 *
26 * @param string $size The size of the image.
27 * @param array $attr The attributes for the tag.
28 *
29 * @return string
30 */
31 public function html( $size = 'full', $attr = [] ): string {
32 return $this->item->html( $size, $attr );
33 }
34
35 /**
36 * Get the image data.
37 *
38 * @param string $size The size of the image.
39 * @param array $attr The attributes for the tag.
40 *
41 * @return array
42 */
43 public function attributes( $size = 'full', $attr = [] ) {
44 return $this->item->attributes( $size, $attr );
45 }
46 }
47