_getDataObj()->getList())) {
return null;
}
$blockData['linkType'] = 'url';
$blockData['linkPageId'] = null;
$blockData['linkTitle'] = 'Follow Us';
$blockData['linkUrl'] = 'https://twitter.com/' . htmlspecialchars($this->_getDataObj()->getScreenName());
$blockId = $this->_getBlockId();
$item = [
'blockId' => $blockId,
'list' => $list,
'tpl' => $this->getTemplate('sideBlock.tpl'),
];
$item['stylesheet'][] = ['css/thirdpart/royalslider.css'];
$item['script'][] = ['js/royalslider/jquery.royalslider.js'];
$item['script'][] = ['js/royalslider/jquery.rs.auto-height.js'];
$item['script'][] = ['js/royalslider/jquery.rs.autoplay.js'];
$options = ['blockId' => $blockId];
if (($sliderOptions = $this->getConfig('sliderOptions'))) {
$options['sliderOptions'] = $sliderOptions->toArray();
}
$item['script'][] = ['js/app/twitter/block.js'];
$item['initObject'][] = ['app.twitter.Block', [$options]];
return $item;
}
public static function getReloadTweetsUrl()
{
if (($url = View::getPage('url'))) {
$url .= '?' . http_build_query(['action' => 'updateTweets']);
}
return $url;
}
/**
* cron job action used for caching latest tweets
*/
protected function _doUpdateTweets()
{
$this->_getDataObj()->updateTweets();
if (($errors = $this->_getDataObj()->getErrors())) {
die('fail:
' . implode('
', $errors));
}
die('done');
}
}