<?php
namespace Website\Widgets\Countdown; use Moto; class Widget extends Moto\System\Widgets\AbstractWidget { protected $_name = 'countdown'; protected static $_defaultProperties = array( 'preset' => 'default', 'align' => array( 'desktop' => 'left', 'tablet' => '', 'mobile-v' => '', 'mobile-h' => '', ), 'animation' => '', 'visible_on' => 'mobile-v', 'spacing' => array( 'top' => 'auto', 'right' => 'auto', 'bottom' => 'auto', 'left' => 'auto', ), 'timezone' => 0, 'type' => 'event', 'items' => array(), 'delimiter' => ':', 'language' => 'en', 'onExpiry' => 'stop', 'timeMeridianMode' => true, ); protected $_templateType = 'templates'; protected $_widgetId = true; public function getEnabledItems() { return array_filter($this->getPropertyValue('items'), function ($item) { return $item['enabled']; }); } } 