Created
May 20, 2013 13:23
-
-
Save e06widu/5612205 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // No direct access to this file | |
| defined('_JEXEC') or die('Restricted access'); | |
| // import Joomla view library | |
| jimport('joomla.application.component.view'); | |
| // import Joomla html for use with stylesheets | |
| jimport('joomla.html.html'); | |
| /** | |
| * JoinTCMs View | |
| */ | |
| class MyResourceListViewJoinWithUs extends JViewLegacy | |
| { | |
| function display($tpl = null) | |
| { | |
| // Get some data from the models | |
| $state = $this->get('State'); | |
| $item = $this->get('Item'); | |
| $this->form = $this->get('Form'); | |
| $this->state = $state; | |
| // Check for errors. | |
| if (count($errors = $this->get('Errors'))) | |
| { | |
| JError::raiseError(500, implode('<br />', $errors)); | |
| return false; | |
| } | |
| // Display the view | |
| parent::display($tpl); | |
| // Set the document | |
| $this->setDocument(); | |
| } | |
| /* | |
| * Method to set up the document properties | |
| * | |
| * @return void | |
| */ | |
| protected function setDocument() | |
| { | |
| $document = JFactory::getDocument(); | |
| $document->setTitle(JText::_('Join With Us')); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment