/www/protected/modules/shop/views/admin/settings/_settingsHeader.php

https://bitbucket.org/badenkov/demo · PHP · 23 lines · 22 code · 1 blank · 0 comment · 5 complexity · c7bbcb87422e0e078317992beeb2814e MD5 · raw file

  1. <?php
  2. $items = array();
  3. $items[] = array(
  4. 'label' => 'Общие',
  5. 'url' => array('/shop/admin/settings'),
  6. 'active' => !isset($_GET['s']),
  7. );
  8. foreach ($paymentsConfig->getSafeAttributeNames() as $name) {
  9. if (false == $paymentsConfig->{$name} || !method_exists($this, 'settings'.ucwords($name))) {
  10. continue;
  11. }
  12. $items[] = array(
  13. 'label' => $paymentsConfig->getAttributeLabel($name),
  14. 'url' => array('/shop/admin/settings', 's' => $name),
  15. 'active' => isset($_GET['s']) && $_GET['s'] == $name,
  16. );
  17. }
  18. $this->widget('ext.bootstrap.widgets.BootMenu', array(
  19. 'type' => 'tabs',
  20. 'stacked' => false,
  21. 'items' => $items,
  22. ));