PageRenderTime 59ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/app/code/core/Enterprise/Rma/Block/Link.php

https://bitbucket.org/kdms/sh-magento
PHP | 58 lines | 14 code | 2 blank | 42 comment | 2 complexity | 6d5edde8b8a0005a064efb06b04a166d MD5 | raw file
  1. <?php
  2. /**
  3. * Magento Enterprise Edition
  4. *
  5. * NOTICE OF LICENSE
  6. *
  7. * This source file is subject to the Magento Enterprise Edition License
  8. * that is bundled with this package in the file LICENSE_EE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://www.magentocommerce.com/license/enterprise-edition
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@magentocommerce.com so we can send you a copy immediately.
  14. *
  15. * DISCLAIMER
  16. *
  17. * Do not edit or add to this file if you wish to upgrade Magento to newer
  18. * versions in the future. If you wish to customize Magento for your
  19. * needs please refer to http://www.magentocommerce.com for more information.
  20. *
  21. * @category Enterprise
  22. * @package Enterprise_Rma
  23. * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
  24. * @license http://www.magentocommerce.com/license/enterprise-edition
  25. */
  26. /**
  27. * RMA Return Block
  28. *
  29. * @category Enterprise
  30. * @package Enterprise_Rma
  31. * @author Magento Core Team <core@magentocommerce.com>
  32. */
  33. class Enterprise_Rma_Block_Link extends Mage_Core_Block_Template
  34. {
  35. /**
  36. * Adding link to account links block link params if rma
  37. * is allowed globaly and for current store view
  38. *
  39. * @param string $block
  40. * @param string $name
  41. * @param string $path
  42. * @param string $label
  43. * @param array $urlParams
  44. * @return Enterprise_Rma_Block_Link
  45. */
  46. public function addDashboardLink($block, $name, $path, $label, $urlParams = array())
  47. {
  48. if (Mage::helper('enterprise_rma')->isEnabled()) {
  49. $blockInstance = $this->getLayout()->getBlock($block);
  50. if ($blockInstance) {
  51. $blockInstance->addLink($name, $path, $label, $urlParams);
  52. }
  53. }
  54. return $this;
  55. }
  56. }