public function init()
 {
     // Check if tt_news is active
     if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('tt_news')) {
         return false;
     }
     // Init Parent
     parent::init();
     // Build config
     $config = array('item_limit' => array('default' => 10, 'type' => 'int'), 'sysFolderID' => array('default' => 0, 'type' => 'int'));
     // Set the Default config
     $this->setDefaultConfig($config);
     // Set title & icon
     $title = 'Latest News';
     if ((int) $this->getConfigVar('sysFolderID')) {
         $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'deleted=0 AND hidden=0 AND uid=' . (int) $this->getConfigVar('sysFolderID'), '', '', 1);
         $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
         if (sizeof($row['title']) > 0) {
             $title .= ' - ' . $row['title'];
         }
     }
     # if
     $this->setTitle($title);
     $this->setIcon(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('tt_news') . '/ext_icon.gif');
     return true;
 }
 public function init()
 {
     // Check if sys_notepad is active
     if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('sys_notepad')) {
         return false;
     }
     // Init Parent
     parent::init();
     // Set title & icon
     $this->setTitle($this->getInternalLabel('notepad'));
     $this->setIcon(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('sys_notepad') . '/ext_icon.gif');
     return true;
 }
 public function init()
 {
     // Init Parent
     parent::init();
     // Build config
     $config = array('item_limit' => array('default' => 10, 'type' => 'int'), 'user_timeout_min' => array('default' => 60, 'type' => 'int'));
     // Add Language File
     $this->addLanguageFile(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('EXT:mydashboard/widgets/labels.xml'));
     // Set the Default config
     $this->setDefaultConfig($config);
     // Set title & icon
     $this->setTitle('Users Stats');
     $this->setIcon(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('mydashboard') . 'widgets/icon/tx_mydashboard_userstats.gif');
     // required
     return true;
 }
 public function init()
 {
     // Init Parent
     parent::init();
     // Build config
     $config = array('item_limit' => array('default' => 6, 'type' => 'int'), 'feed_title' => array('default' => 'Any Feed', 'type' => 'string'), 'feed_url' => array('default' => '', 'type' => 'string'), 'cache_time_h' => array('default' => 12, 'type' => 'int'));
     // Add Language File
     $this->addLanguageFile(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('EXT:mydashboard/widgets/labels.xml'));
     // Set the Default config
     $this->setDefaultConfig($config);
     // Set title & icon
     $this->setIcon(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('mydashboard') . 'widgets/icon/tx_mydashboard_rssfeed.png');
     $this->setTitle('RSS: ' . $this->getConfigVar('feed_title'));
     // required
     return true;
 }