1: <?php
2: /**
3: * Magento
4: *
5: * NOTICE OF LICENSE
6: *
7: * This source file is subject to the Open Software License (OSL 3.0)
8: * that is bundled with this package in the file LICENSE.txt.
9: * It is also available through the world-wide-web at this URL:
10: * http://opensource.org/licenses/osl-3.0.php
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 Mage
22: * @package Mage_Page
23: * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24: * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25: */
26:
27:
28: /**
29: * Simple links list block
30: *
31: * @category Mage
32: * @package Mage_Core
33: * @author Magento Core Team <core@magentocommerce.com>
34: */
35: class Mage_Page_Block_Template_Links_Block extends Mage_Core_Block_Template
36: {
37:
38: /**
39: * First link flag
40: *
41: * @var bool
42: */
43: protected $_isFirst = false;
44:
45: /**
46: * Last link flag
47: *
48: * @var bool
49: */
50: protected $_isLast = false;
51:
52: /**
53: * Link label
54: *
55: * @var string
56: */
57: protected $_label = null;
58:
59: /**
60: * Link url
61: *
62: * @var string
63: */
64: protected $_url = null;
65:
66: /**
67: * Link title
68: *
69: * @var string
70: */
71: protected $_title = null;
72:
73: /**
74: * Li elemnt params
75: *
76: * @var string
77: */
78: protected $_liPparams = null;
79:
80: /**
81: * A elemnt params
82: *
83: * @var string
84: */
85: protected $_aPparams = null;
86:
87: /**
88: * Message before link text
89: *
90: * @var string
91: */
92: protected $_beforeText = null;
93:
94: /**
95: * Message after link text
96: *
97: * @var string
98: */
99: protected $_afterText = null;
100:
101: /**
102: * Position in link list
103: * @var int
104: */
105: protected $_position = 0;
106:
107: /**
108: * Set default template
109: *
110: */
111: protected function _construct()
112: {
113: $this->setTemplate('page/template/linksblock.phtml');
114: }
115:
116:
117: /**
118: * Return link position in link list
119: *
120: * @return in
121: */
122: public function getPosition()
123: {
124: return $this->_position;
125: }
126:
127: /**
128: * Return first position flag
129: *
130: * @return bool
131: */
132: public function getIsFirst()
133: {
134: return $this->_isFirst;
135: }
136:
137: /**
138: * Set first list flag
139: *
140: * @param bool $value
141: * return Mage_Page_Block_Template_Links_Block
142: */
143: public function setIsFirst($value)
144: {
145: $this->_isFirst = (bool)$value;
146: return $this;
147: }
148:
149: /**
150: * Return last position flag
151: *
152: * @return bool
153: */
154: public function getIsLast()
155: {
156: return $this->_isLast;
157: }
158:
159: /**
160: * Set last list flag
161: *
162: * @param bool $value
163: * return Mage_Page_Block_Template_Links_Block
164: */
165: public function setIsLast($value)
166: {
167: $this->_isLast = (bool)$value;
168: return $this;
169: }
170:
171: /**
172: * Return link label
173: *
174: * @return string
175: */
176: public function getLabel()
177: {
178: return $this->_label;
179: }
180:
181: /**
182: * Return link title
183: *
184: * @return string
185: */
186: public function getTitle()
187: {
188: return $this->_title;
189: }
190:
191: /**
192: * Return link url
193: *
194: * @return string
195: */
196: public function getLinkUrl()
197: {
198: return $this->_url;
199: }
200:
201: }
202: