index.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Kubio\Blocks; |
| 4 | |
| 5 | use Kubio\Core\Blocks\BlockBase; |
| 6 | use Kubio\Core\Registry; |
| 7 | |
| 8 | class IconBlock extends BlockBase { |
| 9 | |
| 10 | const OUTER = 'outer'; |
| 11 | const INNER = 'inner'; |
| 12 | |
| 13 | public function mapPropsToElements() { |
| 14 | $link = $this->getAttribute( 'link' ); |
| 15 | $name = $this->getAttribute( 'name' ); |
| 16 | return array( |
| 17 | self::OUTER => array( 'link' => $link ), |
| 18 | self::INNER => array( 'name' => $name ), |
| 19 | ); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | |
| 24 | Registry::registerBlock( |
| 25 | __DIR__, |
| 26 | IconBlock::class |
| 27 | ); |
| 28 |