v1.php 656 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace zin;
  3. require_once dirname(__DIR__) . DS . 'fileselector' . DS . 'v1.php';
  4. class imageSelector extends fileSelector
  5. {
  6. /**
  7. * @var mixed[]
  8. */
  9. protected static $defaultProps = array
  10. (
  11. 'mode' => 'grid'
  12. );
  13. /**
  14. * Build the widget.
  15. *
  16. * @access protected
  17. * @return node
  18. */
  19. protected function build()
  20. {
  21. return zui::imageSelector(inherit($this));
  22. }
  23. protected function created()
  24. {
  25. if(!$this->hasProp('tip'))
  26. {
  27. global $lang;
  28. $this->setProp('tip', $lang->uploadImagesTip);
  29. }
  30. parent::created();
  31. }
  32. }