ViewAjax.php 705 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. class ViewAjax {
  3. protected $_tbl;
  4. protected $_label;
  5. protected $_zasobID;
  6. protected function generateHtmlID() {
  7. return $this->_tbl;//TODO: uniqid($this->_tbl);
  8. }
  9. public function setLabel($label) {
  10. $this->_label = $label;
  11. $this->_saveState('_label');
  12. }
  13. public function getHtmlID() {
  14. return $this->_htmlID;
  15. }
  16. public function getLabel() {
  17. if (!empty($this->_label)) {
  18. return V::strShortUtf8($this->_label, 20);
  19. }
  20. return "{$this->_tbl}";
  21. }
  22. public function getLabelHtml() {
  23. if (!empty($this->_label)) {
  24. return V::strShortUtf8($this->_label, 20) . " <em>({$this->_tbl})</em>";
  25. }
  26. return "{$this->_tbl}";
  27. }
  28. protected function _saveState($key = null) {
  29. }
  30. }