本文整理汇总了PHP中utf8_strtoupper函数的典型用法代码示例。如果您正苦于以下问题:PHP utf8_strtoupper函数的具体用法?PHP utf8_strtoupper怎么用?PHP utf8_strtoupper使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了utf8_strtoupper函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: generate
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['memberreader'][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();
}
// logic for this is done in HeimrichHannot\Memberplus\Hooks::getPageIdFromUrlHook
if (\Input::get('article_reader')) {
\Input::setGet('items', \Input::get('article_reader'));
} else {
if (!isset($_GET['items']) && \Config::get('useAutoItem') && isset($_GET['auto_item'])) {
\Input::setGet('items', \Input::get('auto_item'));
}
}
if (!\Input::get('items')) {
return '';
}
$this->mlGroups = deserialize($this->mlGroups);
if (!is_array($this->mlGroups) || empty($this->mlGroups)) {
return '';
}
return parent::generate();
}
开发者ID:heimrichhannot,项目名称:contao-member_plus,代码行数:28,代码来源:ModuleMemberReader.php
示例2: generate
/**
* Generate the module
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['mod_airquality_full'][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['items']) && $GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item'])) {
\Input::setGet('items', \Input::get('auto_item'));
}
// Return if there are no items
if (!\Input::get('items')) {
return '';
}
if (TL_MODE == 'FE') {
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/airquality/assets/js/Chart.min.js|static';
$GLOBALS['TL_CSS'][] = 'system/modules/airquality/assets/styles/style.css';
}
return parent::generate();
}
开发者ID:respinar,项目名称:contao-airquality,代码行数:28,代码来源:ModuleAirQualityFull.php
示例3: generate
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['acquisto_category_nav'][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();
}
if (FE_USER_LOGGED_IN) {
$this->Import('FrontendUser', 'Member');
}
$this->generateTrail(\Input::get('category'));
$pid = 0;
if ($this->acquisto_levelOffset != 0) {
$pid = $this->trail[$this->acquisto_levelOffset - 1];
} elseif ($this->acquisto_referenceCategory) {
$pid = $this->acquisto_referenceCategory;
}
$this->items = $this->getCategory($pid, $this->acquisto_levelOffset, 0, $this->acquisto_hardlimit);
if (!is_array($this->items)) {
return '';
}
return parent::generate();
}
开发者ID:Acquisto,项目名称:acquisto_core,代码行数:27,代码来源:ModuleAcquistoCategoryNav.php
示例4: 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']['listing'][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();
}
// Return if the table or the fields have not been set
if ($this->list_table == '' || $this->list_fields == '') {
return '';
}
// Disable the details page
if (\Input::get('show') && $this->list_info == '') {
return '';
}
// Fallback to the default template
if ($this->list_layout == '') {
$this->list_layout = 'list_default';
}
$this->strTemplate = $this->list_layout;
$this->list_where = $this->replaceInsertTags($this->list_where, false);
$this->list_info_where = $this->replaceInsertTags($this->list_info_where, false);
return parent::generate();
}
开发者ID:juergen83,项目名称:contao,代码行数:34,代码来源:ModuleListing.php
示例5: 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']['rss_reader'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = '' . $GLOBALS['TL_CONFIG']['backendPath'] . '/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$this->objFeed = new \SimplePie();
$arrUrls = trimsplit('[\\n\\t ]', trim($this->rss_feed));
if (count($arrUrls) > 1) {
$this->objFeed->set_feed_url($arrUrls);
} else {
$this->objFeed->set_feed_url($arrUrls[0]);
}
$this->objFeed->set_output_encoding(\Config::get('characterSet'));
$this->objFeed->set_cache_location(TL_ROOT . '/system/tmp');
$this->objFeed->enable_cache(false);
if ($this->rss_cache > 0) {
$this->objFeed->enable_cache(true);
$this->objFeed->set_cache_duration($this->rss_cache);
}
if (!$this->objFeed->init()) {
$this->log('Error importing RSS feed "' . $this->rss_feed . '"', __METHOD__, TL_ERROR);
return '';
}
$this->objFeed->handle_content_type();
return parent::generate();
}
开发者ID:rheintechnology,项目名称:core,代码行数:38,代码来源:ModuleRssReader.php
示例6: generate
/**
* Do not display the module if there are no articles
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['articlenav'][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();
}
global $objPage;
$this->objArticles = \ArticleModel::findPublishedWithTeaserByPidAndColumn($objPage->id, $this->strColumn);
// Return if there are no articles
if ($this->objArticles === null) {
return '';
}
// Redirect to the first article if no article is selected
if (!\Input::get('articles')) {
if (!$this->loadFirst) {
return '';
}
$strAlias = $this->objArticles->alias != '' && !\Config::get('disableAlias') ? $this->objArticles->alias : $this->objArticles->id;
$this->redirect($this->addToUrl('articles=' . $strAlias));
}
return parent::generate();
}
开发者ID:iCodr8,项目名称:core,代码行数:31,代码来源:ModuleArticlenav.php
示例7: generate
/**
* Logout the current user and redirect
*
* @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']['logout'][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 last page visited
if ($this->redirectBack) {
$_SESSION['LAST_PAGE_VISITED'] = $this->getReferer();
}
$this->import('FrontendUser', 'User');
$strRedirect = \Environment::get('base');
// Redirect to last page visited
if ($this->redirectBack && !empty($_SESSION['LAST_PAGE_VISITED'])) {
$strRedirect = $_SESSION['LAST_PAGE_VISITED'];
} elseif ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) !== null) {
/** @var \PageModel $objTarget */
$strRedirect = $objTarget->getFrontendUrl();
}
// Log out and redirect
if ($this->User->logout()) {
$this->redirect($strRedirect);
}
return '';
}
开发者ID:bytehead,项目名称:contao-core,代码行数:36,代码来源:ModuleLogout.php
示例8: 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();
}
开发者ID:eknoes,项目名称:core,代码行数:30,代码来源:ModuleCalendar.php
示例9: generate
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['eventlist_plus'][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 '';
}
parent::generate();
// needs to be overwritten in model, otherwise datacontainer argument in options_callback contains protected calendars
$this->objModel->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
$objForm = new EventFilterForm($this->objModel);
if (($strForm = $objForm->generate()) === null) {
return '';
}
$this->Template->form = $objForm->generate();
return $this->Template->parse();
}
开发者ID:heimrichhannot,项目名称:contao-calendar_plus,代码行数:30,代码来源:ModuleEventFilter.php
示例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 = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['carpet_list'][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->carpet_categories = $this->sortOutProtected(deserialize($this->carpet_categories));
// No carpaets categries available
if (!is_array($this->carpet_categories) || empty($this->carpet_categories)) {
return '';
}
// Show the catalog detail if an item has been selected
if ($this->carpet_detailModule > 0 && (isset($_GET['items']) || $GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item']))) {
return $this->getFrontendModule($this->carpet_detailModule, $this->strColumn);
}
if (TL_MODE == 'FE') {
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/carpet/assets/jquery.raty.min.js|static';
}
return parent::generate();
}
开发者ID:respinar,项目名称:contao-carpet,代码行数:29,代码来源:ModuleCarpetList.php
示例11: generate
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['modulealias'][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();
}
$arrModules = deserialize($this->aliasModules);
if (is_array($arrModules) && count($arrModules)) {
global $objPage;
$objModules = $this->Database->execute("SELECT id, aliasPages FROM tl_module WHERE id IN (" . implode(',', $arrModules) . ") ORDER BY " . $this->Database->findInSet('id', $arrModules));
while ($objModules->next()) {
$arrPages = deserialize($objModules->aliasPages);
if (is_array($arrPages) && count($arrPages)) {
foreach ($arrPages as $intPage) {
$arrPages = array_merge($arrPages, $this->getChildRecords($intPage, 'tl_page', false));
}
if (in_array($objPage->id, $arrPages)) {
return $this->getFrontendModule($objModules->id, $this->inColumn);
}
}
}
}
return '';
}
开发者ID:terminal42,项目名称:contao-z_modulealias,代码行数:29,代码来源:ModuleAlias.php
示例12: pagefromtemplate
function pagefromtemplate(&$event, $param)
{
if (strlen(trim($_REQUEST['newpagetemplate'])) > 0) {
global $conf;
global $INFO;
global $ID;
$tpl = io_readFile(wikiFN($_REQUEST['newpagetemplate']));
if ($this->getConf('userreplace')) {
$stringvars = array_map(create_function('$v', 'return explode(",",$v,2);'), explode(';', $_REQUEST['newpagevars']));
foreach ($stringvars as $value) {
$tpl = str_replace(trim($value[0]), trim($value[1]), $tpl);
}
}
if ($this->getConf('standardreplace')) {
// replace placeholders
$file = noNS($ID);
$page = strtr($file, '_', ' ');
$tpl = str_replace(array('@ID@', '@NS@', '@FILE@', '@!FILE@', '@!FILE!@', '@PAGE@', '@!PAGE@', '@!!PAGE@', '@!PAGE!@', '@USER@', '@NAME@', '@MAIL@', '@DATE@'), array($ID, getNS($ID), $file, utf8_ucfirst($file), utf8_strtoupper($file), $page, utf8_ucfirst($page), utf8_ucwords($page), utf8_strtoupper($page), $_SERVER['REMOTE_USER'], $INFO['userinfo']['name'], $INFO['userinfo']['mail'], $conf['dformat']), $tpl);
// we need the callback to work around strftime's char limit
$tpl = preg_replace_callback('/%./', create_function('$m', 'return strftime($m[0]);'), $tpl);
}
$event->result = $tpl;
$event->preventDefault();
}
}
开发者ID:jasongrout,项目名称:dokuwiki-newpagetemplate,代码行数:25,代码来源:action.php
示例13: utf8_ucwords_callback
/**
* Callback function for preg_replace_callback call in utf8_ucwords
* You don't need to call this yourself
* @param array of matches corresponding to a single word
* @return string with first char of the word in uppercase
* @see utf8_ucwords
* @see utf8_strtoupper
* @package utf8
* @subpackage strings
*/
function utf8_ucwords_callback($matches)
{
$leadingws = $matches[2];
$ucfirst = utf8_strtoupper($matches[3]);
$ucword = utf8_substr_replace(ltrim($matches[0]), $ucfirst, 0, 1);
return $leadingws . $ucword;
}
开发者ID:HawesDomingue,项目名称:mechanic-watson,代码行数:17,代码来源:ucwords.php
示例14: index
public function index()
{
$this->load->language('product/manufacturer');
$this->load->model('catalog/manufacturer');
$this->load->model('tool/image');
$this->document->setTitle($this->language->get('heading_title'));
$data['heading_title'] = $this->language->get('heading_title');
$data['text_index'] = $this->language->get('text_index');
$data['text_empty'] = $this->language->get('text_empty');
$data['button_continue'] = $this->language->get('button_continue');
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home'));
$data['breadcrumbs'][] = array('text' => $this->language->get('text_brand'), 'href' => $this->url->link('product/manufacturer'));
$data['categories'] = array();
$results = $this->model_catalog_manufacturer->getManufacturers();
foreach ($results as $result) {
if (is_numeric(utf8_substr($result['name'], 0, 1))) {
$key = '0 - 9';
} else {
$key = utf8_substr(utf8_strtoupper($result['name']), 0, 1);
}
if (!isset($data['categories'][$key])) {
$data['categories'][$key]['name'] = $key;
}
$data['categories'][$key]['manufacturer'][] = array('name' => $result['name'], 'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $result['manufacturer_id']));
}
$data['continue'] = $this->url->link('common/home');
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer');
$data['header'] = $this->load->controller('common/header');
$this->response->setOutput($this->load->view('product/manufacturer_list', $data));
}
开发者ID:brunoxu,项目名称:mycncart,代码行数:35,代码来源:manufacturer.php
示例15: generate
/**
* @return string
*/
public function generate()
{
// Backend
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['member_rating'][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 ($GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item'])) {
\Input::setGet('member', \Input::get('auto_item'));
}
// activate comment by token via url
if (strlen(\Input::get('activation_token'))) {
$this->activateOrDelete();
exit;
}
// set the ratedUser var
$this->ratedUser = \MemberModel::findByPk(\Input::get('member'));
if ($this->ratedUser === null) {
return '';
}
// overwrite default template
if ($this->memberRatingDetailTemplate != '') {
$this->strTemplate = $this->memberRatingDetailTemplate;
}
return parent::generate();
}
开发者ID:markocupic,项目名称:member_rating,代码行数:35,代码来源:MemberRatingDetail.php
示例16: compile
/**
* Generate module
*/
protected function compile()
{
$objTerm = $this->Database->execute("SELECT * FROM tl_glossary_term WHERE pid IN(" . implode(',', array_map('intval', $this->glossaries)) . ")" . " ORDER BY sortTerm");
if ($objTerm->numRows < 1) {
$this->Template->terms = array();
return;
}
global $objPage;
$this->import('String');
$arrTerms = array();
while ($objTerm->next()) {
$objTemp = new stdClass();
$key = utf8_strtoupper(utf8_substr($objTerm->sortTerm, 0, 1));
$objTemp->term = $objTerm->term;
$objTemp->anchor = 'gl' . utf8_romanize($key);
$objTemp->id = standardize($objTerm->term);
$objTemp->isParent = false;
$objTemp->isReference = false;
if ($objTerm->addReference) {
if ($objTerm->referenceType == 'parent') {
$objTemp->hasParent = true;
} elseif ($objTerm->referenceType == 'reference') {
$objTemp->isReference = true;
$objTemp->referenceTerm = false;
$objReference = $this->Database->prepare("SELECT `id`,`term` FROM `tl_glossary_term` WHERE `id`=?")->execute($objTerm->referenceTerm);
if ($objReference->next()) {
$objTemp->referenceTerm = $objReference->term;
$objTemp->referenceAnchor = standardize($objReference->term);
}
}
}
// Clean the RTE output
if ($objPage->outputFormat == 'xhtml') {
$objTerm->definition = $this->String->toXhtml($objTerm->definition);
} else {
$objTerm->definition = $this->String->toHtml5($objTerm->definition);
}
$objTemp->definition = $this->String->encodeEmail($objTerm->definition);
if ($objTerm->addExample) {
$objTemp->addExample = true;
$objTemp->example = $objPage->outputFormat == 'xhtml' ? $this->String->toXhtml($objTerm->example) : $this->String->toHtml5($objTerm->example);
} else {
$objTemp->addExample = false;
}
$objTemp->addImage = false;
// Add image
if ($objTerm->addImage && is_file(TL_ROOT . '/' . $objTerm->singleSRC)) {
$this->addImageToTemplate($objTemp, $objTerm->row());
}
$objTemp->enclosures = array();
// Add enclosures
if ($objTerm->addEnclosure) {
$this->addEnclosuresToTemplate($objTemp, $objTerm->row());
}
$arrTerms[$key][] = $objTemp;
}
$this->Template->terms = $arrTerms;
$this->Template->request = ampersand($this->Environment->request, true);
$this->Template->topLink = $GLOBALS['TL_LANG']['MSC']['backToTop'];
}
开发者ID:4t2,项目名称:glossary2,代码行数:63,代码来源:ModuleGlossaryList.php
示例17: generate
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['newslist_plus'][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->news_archives = $this->sortOutProtected(deserialize($this->news_archives));
// Return if there are no archives
if (!is_array($this->news_archives) || empty($this->news_archives)) {
return '';
}
$this->news_featured = 'featured';
// unset search string for highlighted section
\Input::setGet('searchKeywords', null);
$this->objArticles = NewsPlusModel::findPublishedByPids($this->news_archives, array(), array(), $this->news_featured == 'featured', $this->numberOfItems, 0);
if ($this->objArticles === null) {
return '';
}
return parent::generate();
}
开发者ID:heimrichhannot,项目名称:contao-news_plus,代码行数:29,代码来源:ModuleNewsListHighlight.php
示例18: 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']['newsreader'][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['items']) && \Config::get('useAutoItem') && isset($_GET['auto_item'])) {
\Input::setGet('items', \Input::get('auto_item'));
}
// Do not index or cache the page if no news item has been specified
if (!\Input::get('items')) {
/** @var \PageModel $objPage */
global $objPage;
$objPage->noSearch = 1;
$objPage->cache = 0;
return '';
}
$this->news_archives = $this->sortOutProtected(deserialize($this->news_archives));
// Do not index or cache the page if there are no archives
if (!is_array($this->news_archives) || empty($this->news_archives)) {
/** @var \PageModel $objPage */
global $objPage;
$objPage->noSearch = 1;
$objPage->cache = 0;
return '';
}
return parent::generate();
}
开发者ID:StephenGWills,项目名称:sample-contao-app,代码行数:40,代码来源:ModuleNewsReader.php
示例19: index
public function index()
{
$this->language->load('product/manufacturer');
$this->load->model('catalog/manufacturer');
$this->load->model('tool/image');
$this->document->setTitle($this->language->get('heading_title'));
$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['text_index'] = $this->language->get('text_index');
$this->data['text_empty'] = $this->language->get('text_empty');
$this->data['button_continue'] = $this->language->get('button_continue');
$this->data['breadcrumbs'] = array();
$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home'), 'separator' => false);
$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_brand'), 'href' => $this->url->link('product/manufacturer'), 'separator' => $this->language->get('text_separator'));
$this->data['categories'] = array();
$results = $this->model_catalog_manufacturer->getManufacturers();
foreach ($results as $result) {
if (is_numeric(utf8_substr($result['name'], 0, 1))) {
$key = '0 - 9';
} else {
$key = utf8_substr(utf8_strtoupper($result['name']), 0, 1);
}
if (!isset($this->data['manufacturers'][$key])) {
$this->data['categories'][$key]['name'] = $key;
}
$this->data['categories'][$key]['manufacturer'][] = array('name' => $result['name'], 'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $result['manufacturer_id']));
}
$this->data['continue'] = $this->url->link('common/home');
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/manufacturer_list.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/manufacturer_list.tpl';
} else {
$this->template = 'default/template/product/manufacturer_list.tpl';
}
$this->children = array('common/column_left', 'common/column_right', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header');
$this->response->setOutput($this->render());
}
开发者ID:2eye-studios,项目名称:development,代码行数:35,代码来源:manufacturer.php
示例20: generate
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['newsreader'][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();
}
global $objPage;
if ($this->news_template_modal) {
$this->strTemplate = 'mod_news_modal';
$this->news_template = $this->news_template_modal;
// list config
$this->news_showInModal = true;
$this->news_readerModule = $this->id;
// set modal css ID for generateModal() and parent::generate()
$arrCss = deserialize($this->cssID, true);
$arrCss[0] = NewsPlusHelper::getCSSModalID($this->id);
$this->cssID = $arrCss;
$this->base = \Controller::generateFrontendUrl($objPage->row());
if ($this->Environment->isAjaxRequest && !$this->isSearchIndexer()) {
$this->strTemplate = 'mod_news_modal_ajax';
$this->generateAjax();
}
if (!$this->checkConditions()) {
return $this->generateModal();
}
}
return parent::generate();
}
开发者ID:heimrichhannot,项目名称:contao-news_plus,代码行数:37,代码来源:ModuleNewsReaderPlus.php
注:本文中的utf8_strtoupper函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论