Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Media.php
Go to the documentation of this file.
1 <?php
2 
8 
10 
18 {
22  const MODULE_NAME = 'Magento_ProductVideo';
23 
27  const XML_PATH_YOUTUBE_API_KEY = 'catalog/product_video/youtube_api_key';
28 
32  const XML_PATH_PLAY_IF_BASE = 'catalog/product_video/play_if_base';
33 
37  const XML_PATH_SHOW_RELATED = 'catalog/product_video/show_related';
38 
42  const XML_PATH_VIDEO_AUTO_RESTART = 'catalog/product_video/video_auto_restart';
43 
47  const MEDIA_TYPE_CONFIG_NODE = 'videos';
48 
52  public function __construct(
53  Context $context
54  ) {
55  parent::__construct($context);
56  }
57 
63  public function getPlayIfBaseAttribute()
64  {
65  return $this->scopeConfig->getValue(self::XML_PATH_PLAY_IF_BASE);
66  }
67 
73  public function getShowRelatedAttribute()
74  {
75  return $this->scopeConfig->getValue(self::XML_PATH_SHOW_RELATED);
76  }
77 
83  public function getVideoAutoRestartAttribute()
84  {
85  return $this->scopeConfig->getValue(self::XML_PATH_VIDEO_AUTO_RESTART);
86  }
87 
93  public function getYouTubeApiKey()
94  {
95  return $this->scopeConfig->getValue(self::XML_PATH_YOUTUBE_API_KEY);
96  }
97 }
__construct(Context $context)
Definition: Media.php:52