本文整理汇总了PHP中Events::generate方法的典型用法代码示例。如果您正苦于以下问题:PHP Events::generate方法的具体用法?PHP Events::generate怎么用?PHP Events::generate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Events
的用法示例。
在下文中一共展示了Events::generate方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generate
/**
* Do not show the module if no calendar has been selected
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### CALENDAR ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
// Return if there are no calendars
if (!is_array($this->cal_calendar) || count($this->cal_calendar) < 1) {
return '';
}
$this->strUrl = preg_replace('/\\?.*$/i', '', $this->Environment->request);
// Get current "jumpTo" page
$objPage = $this->Database->prepare("SELECT id, alias FROM tl_page WHERE id=?")->limit(1)->execute($this->jumpTo);
if ($objPage->numRows) {
$this->strLink = $this->generateFrontendUrl($objPage->row());
} else {
$this->strLink = $this->strUrl;
}
return parent::generate();
}
示例2: generate
/**
* Do not show the module if no calendar has been selected
*
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
/** @var \BackendTemplate|object $objTemplate */
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['calendar'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
// Return if there are no calendars
if (!is_array($this->cal_calendar) || empty($this->cal_calendar)) {
return '';
}
$this->strUrl = preg_replace('/\\?.*$/', '', \Environment::get('request'));
$this->strLink = $this->strUrl;
if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) !== null) {
/** @var \PageModel $objTarget */
$this->strLink = $objTarget->getFrontendUrl();
}
return parent::generate();
}
示例3: generate
/**
* Display a wildcard in the back end
*
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
/** @var \BackendTemplate|object $objTemplate */
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['eventreader'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
// Set the item from the auto_item parameter
if (!isset($_GET['events']) && \Config::get('useAutoItem') && isset($_GET['auto_item'])) {
\Input::setGet('events', \Input::get('auto_item'));
}
// Do not index or cache the page if no event has been specified
if (!\Input::get('events')) {
/** @var \PageModel $objPage */
global $objPage;
$objPage->noSearch = 1;
$objPage->cache = 0;
return '';
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar));
// Do not index or cache the page if there are no calendars
if (!is_array($this->cal_calendar) || empty($this->cal_calendar)) {
/** @var \PageModel $objPage */
global $objPage;
$objPage->noSearch = 1;
$objPage->cache = 0;
return '';
}
return parent::generate();
}
示例4: generate
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### EVENT READER ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
// Set the item from the auto_item parameter
if ($GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item'])) {
$this->Input->setGet('events', $this->Input->get('auto_item'));
}
// Do not index or cache the page if no event has been specified
if (!$this->Input->get('events')) {
global $objPage;
$objPage->noSearch = 1;
$objPage->cache = 0;
return '';
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar));
// Do not index or cache the page if there are no calendars
if (!is_array($this->cal_calendar) || empty($this->cal_calendar)) {
global $objPage;
$objPage->noSearch = 1;
$objPage->cache = 0;
return '';
}
return parent::generate();
}
示例5: generate
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### EVENT READER ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
// Return if no event has been specified
if (!$this->Input->get('events')) {
global $objPage;
// Do not index the page
$objPage->noSearch = 1;
$objPage->cache = 0;
return '';
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar));
// Return if there are no calendars
if (!is_array($this->cal_calendar) || count($this->cal_calendar) < 1) {
global $objPage;
// Do not index the page
$objPage->noSearch = 1;
$objPage->cache = 0;
return '';
}
return parent::generate();
}
示例6: generate
/**
* Generate
* @param boolean
* @return string
*/
public function generate($blnNoMarkup = false)
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### SIMPLE EVENT ATTENDANCE ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
// Return if there is no logged in user
if (!FE_USER_LOGGED_IN) {
return '';
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
// Return if there are no calendars
if (!is_array($this->cal_calendar) || count($this->cal_calendar) < 1) {
return '';
}
// Find the range of Events that should be found
if ($this->ser_showevents == 'all') {
if ($this->Input->get('s') == 'future') {
$this->blnFuture = true;
}
if ($this->Input->get('s') == 'past') {
$this->blnPast = true;
}
}
return parent::generate();
}
开发者ID:felixpfeiffer,项目名称:contao-simple-event-registration,代码行数:36,代码来源:ModuleSimpleEventAttendance.php
示例7: generate
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### UPCOMING EVENTS ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'typolight/main.php?do=modules&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
// Return if there are no calendars
if (!is_array($this->cal_calendar) || count($this->cal_calendar) < 1) {
return '';
}
return parent::generate();
}
示例8: generate
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### EVENT LIST SUBSCRIBE ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
// Return if there are no calendars
if (!is_array($this->cal_calendar) || empty($this->cal_calendar)) {
return '';
}
return parent::generate();
}
示例9: generate
/**
* Do not show the module if no calendar has been selected
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### MINI CALENDAR ###';
$objTemplate->headline = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->title = $this->name;
$objTemplate->href = 'typolight/main.php?do=modules&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
// Return if there are no calendars
if (!is_array($this->cal_calendar) || count($this->cal_calendar) < 1) {
return '';
}
$this->strUrl = preg_replace('/\\?.*$/i', '', $this->Environment->request);
return parent::generate();
}
示例10: generate
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### EVENT LIST ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
// Return if there are no calendars
if (!is_array($this->cal_calendar) || empty($this->cal_calendar)) {
return '';
}
// Show the event reader if an item has been selected
if ($this->cal_readerModule > 0 && (isset($_GET['events']) || $GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item']))) {
return $this->getFrontendModule($this->cal_readerModule, $this->strColumn);
}
return parent::generate();
}
示例11: generate
/**
* Do not show the module if no calendar has been selected
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### CALENDAR ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
// Return if there are no calendars
if (!is_array($this->cal_calendar) || empty($this->cal_calendar)) {
return '';
}
$this->strUrl = preg_replace('/\\?.*$/i', '', \Environment::get('request'));
$this->strLink = $this->strUrl;
if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) !== null) {
$this->strLink = $this->generateFrontendUrl($objTarget->row());
}
return parent::generate();
}