PluginProbe ʕ •ᴥ•ʔ
Kubio AI Page Builder / 2.4.3
Kubio AI Page Builder v2.4.3
2.8.2 2.8.1 trunk 1.0.0 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.9.0 2.0.0 2.1.1 2.1.2 2.1.3 2.2.0 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.5 2.5.0 2.5.1 2.5.2 2.5.3 2.6.0 2.6.1 2.6.2 2.6.3 2.6.5 2.6.6 2.6.7 2.7.0 2.7.1 2.7.2 2.7.3 2.8.0
kubio / lib / src / Core / Blocks / BlockContainerBase.php
kubio / lib / src / Core / Blocks Last commit date
Query 1 year ago BlockBase.php 1 year ago BlockContainerBase.php 4 years ago BlockElement.php 3 years ago BlockStyle.php 4 years ago DataHelper.php 4 years ago TemplatePartBlockBase.php 1 year ago
BlockContainerBase.php
59 lines
1 <?php
2
3 namespace Kubio\Core\Blocks;
4
5 use Kubio\Config;
6
7 class BlockContainerBase extends BlockBase {
8
9
10 public $backgroundElement;
11 public $separatorElement;
12
13 public function __construct( $block, $autoload, $context ) {
14 parent::__construct( $block, $autoload, $context );
15 $this->backgroundElement = $this->findElementBy( 'supports.background', true );
16 $this->separatorElement = $this->findElementBy( 'supports.separator', true );
17 parent::create();
18 }
19
20 public function backgroundByMedia() {
21 return $this->getStyleByMedia(
22 'background',
23 Config::value( 'props.background.default' ),
24 array(
25 'styledComponent' => $this->backgroundElement,
26 )
27 );
28 }
29
30 public function separators() {
31 return $this->getStyle(
32 'separators',
33 array(),
34 array(
35 'styledComponent' => $this->separatorElement,
36 )
37 );
38 }
39
40 public function separatorTopEnabledByMedia() {
41 return $this->getStyleByMedia(
42 'separators.top.enabled',
43 false,
44 array(
45 'styledComponent' => $this->separatorElement,
46 )
47 );
48 }
49 public function separatorBottomEnabledByMedia() {
50 return $this->getStyleByMedia(
51 'separators.bottom.enabled',
52 false,
53 array(
54 'styledComponent' => $this->separatorElement,
55 )
56 );
57 }
58 }
59