PageRenderTime 40ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/administrator/components/com_fabrik/elements/eval.php

https://github.com/dimoss/fabrik21
PHP | 42 lines | 15 code | 6 blank | 21 comment | 1 complexity | 0e75a775352c39718959a856b55193ba MD5 | raw file
  1. <?php
  2. /**
  3. * @package Joomla
  4. * @subpackage Fabrik
  5. * @copyright Copyright (C) 2005 Rob Clayburn. All rights reserved.
  6. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
  7. */
  8. // Check to ensure this file is within the rest of the framework
  9. defined('JPATH_BASE') or die();
  10. require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_fabrik'.DS.'helpers'.DS.'element.php');
  11. /**
  12. * Renders a SQL element
  13. *
  14. * @author rob clayburn
  15. * @package fabrikar
  16. * @subpackage Parameter
  17. * @since 1.5
  18. */
  19. class JElementEval extends JElement
  20. {
  21. /**
  22. * Element name
  23. *
  24. * @access protected
  25. * @var string
  26. */
  27. var $_name = 'Eval';
  28. function fetchElement($name, $value, &$node, $control_name)
  29. {
  30. $js = "onclick=\"setAllCheckBoxes('details[eval]', this.checked)\"";
  31. $chk = ($value == '1') ? ' checked="checked"' : '';
  32. $fullName = ElementHelper::getFullName($this, $control_name, $name);
  33. return "<input $js type=\"checkbox\" name=\"" . $fullName . "\" value=\"1\" $chk />";
  34. }
  35. }
  36. ?>