本文整理汇总了PHP中Content::getFrontContent方法的典型用法代码示例。如果您正苦于以下问题:PHP Content::getFrontContent方法的具体用法?PHP Content::getFrontContent怎么用?PHP Content::getFrontContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Content
的用法示例。
在下文中一共展示了Content::getFrontContent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: indexAction
/** Setup index page
*/
public function indexAction()
{
$content = new Content();
$this->view->contents = $content->getFrontContent('database');
$thumbs = new Slides();
$this->view->thumbs = $thumbs->getLast10Thumbnails(4);
$finds = new Finds();
$this->view->counts = $finds->getCountAllFinds();
$recent = new Logins();
$this->view->logins = $recent->todayVisitors();
$form = new SolrForm();
$form->setMethod('post');
$this->view->form = $form;
$values = $form->getValues();
if ($this->getRequest()->isPost() && $form->isValid($_POST)) {
if ($form->isValid($form->getValues())) {
$params = array_filter($form->getValues());
$params = $this->array_cleanup($params);
$this->_flashMessenger->addMessage('Your search is complete');
$this->_helper->Redirector->gotoSimple('results', 'search', 'database', $params);
} else {
$form->populate($data);
}
}
}
示例2: indexAction
/** Initialise the index pages
* @access public
* @return void
*/
public function indexAction()
{
$content = new Content();
$this->view->contents = $content->getFrontContent('research');
$research = new ResearchProjects();
$this->view->research = $research->getCounts();
}
示例3: indexAction
public function indexAction()
{
$content = new Content();
$slug = $this->_getParam('slug');
if ($slug == '\\d+') {
$content = new Content();
$this->view->contents = $content->getFrontContent('treports');
$service = Zend_Gdata_Docs::AUTH_SERVICE_NAME;
$client = Zend_Gdata_ClientLogin::getHttpClient($this->_config->webservice->google->username, $this->_config->webservice->google->password, $service);
$docs = new Zend_Gdata_Docs($client);
$docsQuery = new Zend_Gdata_Docs_Query();
$docsQuery->setQuery('title:Treasure Annual Report');
$feed = $docs->getDocumentListFeed($docsQuery);
$documents = array();
foreach ($feed->entries as $entry) {
$title = $entry->title;
foreach ($entry->link as $link) {
if ($link->getRel() === 'alternate') {
$altlink = $link->getHref();
}
}
$documents[] = array('title' => $title, 'altlink' => $altlink, 'updated' => $entry->updated, 'type' => $entry->content->type, 'published' => $entry->published);
}
$this->view->documents = $documents;
} else {
$this->view->contents = $content->getContent('treports', $this->_getParam('slug'));
}
}
示例4: indexAction
/** The index controller
* @access public
* @return void
*/
public function indexAction()
{
$this->_helper->layout->setLayout('database');
$response = $this->getResponse();
$view = Zend_Controller_Action_HelperBroker::getExistingHelper('ViewRenderer')->view;
$response->insert('sidebar', $view->render('structure/menus/dataLabsSidebar.phtml'));
$response->insert('userdata', $view->render('structure/loggedInOrOut.phtml'));
$response->insert('breadcrumb', $view->render('structure/breadcrumb.phtml'));
$response->insert('navigation', $view->render('structure/navigation.phtml'));
$response->insert('footer', $view->render('structure/footer.phtml'));
$response->insert('messages', $view->render('structure/messages.phtml'));
$response->insert('contexts', $view->render('structure/contexts.phtml'));
$response->insert('analytics', $view->render('structure/analytics.phtml'));
$content = new Content();
$this->view->content = $content->getFrontContent('oai');
}
示例5: indexAction
/** Setup index page
* @access public
* @return void
*/
public function indexAction()
{
$content = new Content();
$this->view->contents = $content->getFrontContent('database');
$recent = new Logins();
$this->view->logins = $recent->todayVisitors();
$form = new SolrForm();
$form->q->setLabel('Search our database: ');
$form->setMethod('post');
$this->view->form = $form;
if ($this->getRequest()->isPost() && $form->isValid($this->_request->getPost())) {
$functions = new Pas_ArrayFunctions();
$params = $functions->array_cleanup($form->getValues());
$params = $this->process($params);
$this->getFlash()->addMessage('Your search is complete');
$this->_helper->Redirector->gotoSimple('results', 'search', 'database', $params);
} else {
$form->populate($this->_request->getPost());
}
}
示例6: indexAction
/** Render documents on the index page
*/
public function indexAction()
{
$content = new Content();
$this->view->contents = $content->getFrontContent('publications');
$service = Zend_Gdata_Docs::AUTH_SERVICE_NAME;
$client = Zend_Gdata_ClientLogin::getHttpClient($this->_helper->config->webservice->google->username, $this->_config->webservice->google->password, $service);
$docs = new Zend_Gdata_Docs($client);
$feed = $docs->getDocumentListFeed();
$documents = array();
foreach ($feed->entries as $entry) {
$title = $entry->title;
foreach ($entry->link as $link) {
if ($link->getRel() === 'alternate') {
$altlink = $link->getHref();
}
}
$documents[] = array('title' => $title, 'altlink' => $altlink, 'updated' => $entry->updated, 'type' => $entry->content->type, 'published' => $entry->published);
}
$this->view->documents = $documents;
}
示例7: indexAction
/** The index action
* @access public
* @return void
*/
public function indexAction()
{
$content = new Content();
$this->view->contents = $content->getFrontContent('index');
$form = new SolrForm();
$form->setAttrib('class', 'form-inline');
$this->view->form = $form;
$form->removeElement('thumbnail');
$form->removeElement('3D');
$form->q->removeDecorator('label');
$form->q->setAttrib('class', 'input-large');
if ($this->getRequest()->isPost()) {
if ($form->isValid($this->_request->getPost())) {
$params = array_filter($form->getValues());
unset($params['csrf']);
$this->getFlash()->addMessage('Your search is complete');
$this->_helper->Redirector->gotoSimple('results', 'search', 'database', $params);
} else {
$form->populate($form->getValues());
}
}
}
示例8: indexAction
/**
* Render data for view on index action
*/
function indexAction()
{
$this->view->headTitle('Events at the Scheme');
$content = new Content();
$this->view->contents = $content->getFrontContent('events');
$year = strftime("%Y", strtotime(Zend_Date::now()->toString('yyyy-MM-dd')));
$this->view->year = $year;
$adults = new Events();
$this->view->adults = $adults->getAttendanceAdults($year . '-01-01', $year . '-12-31');
$eventsList = new Events();
$eventsListed = $eventsList->getUpcomingEvents();
$calendar = new Calendar();
$lists = array();
foreach ($eventsListed as $value) {
$lists[] = $value['eventStartDate'];
}
$listedDates = $lists;
$calendar->highlighted_dates = $listedDates;
$url = $this->view->url(array('module' => 'events', 'controller' => 'upcoming', 'action' => 'index'), 'upcoming', true);
$calendar->formatted_link_to = $url . '/%Y-%m-%d';
$cal = '<div id="calendars" style="float:right;margin-top:100px;margin-left:10px;">' . $calendar->output_calendar() . '</div>';
$this->view->cal = $cal;
}
示例9: indexAction
/** Set up view for index page
* @access public
* @return void
*/
public function indexAction()
{
$content = new Content();
$this->view->contents = $content->getFrontContent('conservation');
}
示例10: indexAction
/** Display the index page for the finds recording guide
*
*/
public function indexAction()
{
$content = new Content();
$this->view->front = $content->getFrontContent('frg', 1, 3);
$this->view->contents = $content->getSectionContents('frg');
}
示例11: indexAction
/** Set up the index display pages
*/
public function indexAction()
{
$content = new Content();
$this->view->content = $content->getFrontContent('greekromancoins');
}
示例12: indexAction
/** Display the front page material.
* @access public
* @return void
*/
public function indexAction()
{
$content = new Content();
$this->view->contents = $content->getFrontContent('logoandbranding');
}
示例13: indexAction
/** Set up the index pages
*/
public function indexAction()
{
$content = new Content();
$this->view->content = $content->getFrontContent('postmedievalcoins');
}
示例14: indexAction
/** Set up data for the index page
* @access public
* @return void
*/
public function indexAction()
{
$content = new Content();
$this->view->content = $content->getFrontContent('ironagecoins');
}
示例15: indexAction
/** Display content of our linked data page.
* @access public
* @return void
*/
public function indexAction()
{
$content = new Content();
$this->view->contents = $content->getFrontContent('datalabs');
}