ContentSection.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. *
  4. * PHP Pro Bid $Id$ XZ5Ny3tFt1+kV4xJCoPYhkGeMygzsAUGNn6ts3nHYOg=
  5. *
  6. * @link http://www.phpprobid.com
  7. * @copyright Copyright (c) 2014 Online Ventures Software LTD & CodeCube SRL
  8. * @license http://www.phpprobid.com/license Commercial License
  9. *
  10. * @version 7.0
  11. */
  12. /**
  13. * content sections table row object model
  14. */
  15. namespace Ppb\Db\Table\Row;
  16. class ContentSection extends AbstractRow
  17. {
  18. /**
  19. *
  20. * generate link for content section
  21. *
  22. * @return array
  23. */
  24. public function link()
  25. {
  26. if ($slug = $this->getData('slug')) {
  27. return $slug;
  28. // return array(
  29. // 'module' => 'app',
  30. // 'controller' => 'sections',
  31. // 'action' => 'view',
  32. // 'id' => $this->getData('id'),
  33. // );
  34. }
  35. else {
  36. return array(
  37. 'module' => 'app',
  38. 'controller' => 'sections',
  39. 'action' => 'view',
  40. 'name' => $this->getData('name'),
  41. 'id' => $this->getData('id'),
  42. );
  43. }
  44. }
  45. }