index.php
33 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Kubio\Blocks; |
| 4 | |
| 5 | use Kubio\Core\Blocks\TemplatePartBlockBase; |
| 6 | use Kubio\Core\Registry; |
| 7 | use Kubio\Core\Utils; |
| 8 | |
| 9 | class FooterTemplatePart extends TemplatePartBlockBase { |
| 10 | |
| 11 | |
| 12 | public function mapPropsToElements() { |
| 13 | $html_tag = esc_attr( $this->getAttribute( 'tagName', 'div' ) ); |
| 14 | $scriptData = Utils::useJSComponentProps( |
| 15 | 'footer-parallax', |
| 16 | array( |
| 17 | 'isEnabled' => $this->getProp( 'useFooterParallax', false ), |
| 18 | ) |
| 19 | ); |
| 20 | return array( |
| 21 | self::CONTAINER => array_merge( |
| 22 | array( |
| 23 | 'tag' => $html_tag, |
| 24 | 'innerHTML' => $this->getContent(), |
| 25 | ), |
| 26 | $scriptData |
| 27 | ), |
| 28 | ); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | Registry::registerBlock( __DIR__, FooterTemplatePart::class ); |
| 33 |