0byt3m1n1
Path:
/
data
/
applications
/
aps
/
magento
/
1.9.2.1-35
/
standard
/
htdocs
/
app
/
code
/
core
/
Mage
/
Review
/
Helper
/
[
Home
]
File: Data.php
<?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magento.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magento.com for more information. * * @category Mage * @package Mage_Review * @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** * Default review helper * * @author Magento Core Team <core@magentocommerce.com> */ class Mage_Review_Helper_Data extends Mage_Core_Helper_Abstract { const XML_REVIEW_GUETS_ALLOW = 'catalog/review/allow_guest'; public function getDetail($origDetail){ return nl2br(Mage::helper('core/string')->truncate($origDetail, 50)); } /** * getDetailHtml return short detail info in HTML * @param string $origDetail Full detail info * @return string */ public function getDetailHtml($origDetail){ return nl2br(Mage::helper('core/string')->truncate($this->escapeHtml($origDetail), 50)); } public function getIsGuestAllowToWrite() { return Mage::getStoreConfigFlag(self::XML_REVIEW_GUETS_ALLOW); } /** * Get review statuses with their codes * * @return array */ public function getReviewStatuses() { return array( Mage_Review_Model_Review::STATUS_APPROVED => $this->__('Approved'), Mage_Review_Model_Review::STATUS_PENDING => $this->__('Pending'), Mage_Review_Model_Review::STATUS_NOT_APPROVED => $this->__('Not Approved'), ); } /** * Get review statuses as option array * * @return array */ public function getReviewStatusesOptionArray() { $result = array(); foreach ($this->getReviewStatuses() as $k => $v) { $result[] = array('value' => $k, 'label' => $v); } return $result; } }