PageRenderTime 38ms CodeModel.GetById 7ms RepoModel.GetById 11ms app.codeStats 0ms

/contentmanager/code/trunk/administrator/components/com_contentmanager/helpers/elements/list/splash.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 34 lines | 17 code | 6 blank | 11 comment | 0 complexity | 5de5b364c00cabf0b77e51c5257f94d7 MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: splash.php 80 2009-06-01 07:22:16Z eddieajau $
  4. * @copyright Copyright (C) 2009 New Life in IT Pty Ltd. All rights reserved.
  5. * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
  6. * @link http://www.theartofjoomla.com
  7. */
  8. // no direct access
  9. defined('_JEXEC') or die;
  10. class JElementList_Splash extends JElement
  11. {
  12. /**
  13. * @access protected
  14. * @var string
  15. */
  16. var $_name = 'List_Splash';
  17. function fetchElement($name, $value, &$node, $control_name)
  18. {
  19. JModel::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_contentmanager'.DS.'models');
  20. $model = &JModel::getInstance('Splashes', 'ContentManagerModel');
  21. $model->setState('select', 'a.id, a.title');
  22. $model->setState('published', 1);
  23. $model->setState('order by', 'a.title');
  24. $state = &$model->getState();
  25. $options = $model->getItems(false);
  26. return JHtml::_('select.genericlist', $options, ''.$control_name.'['.$name.']', 'class="inputbox"', 'id', 'title', $value, $control_name.$name);
  27. }
  28. }