Page   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A toOptionArray() 0 17 2
1
<?php
2
3
/**
4
 * Sitewards_B2BProfessional_Model_System_Config_Source_Page
5
 *    - Create an options array with the current system cms pages and the customer login page
6
 *
7
 * @category    Sitewards
8
 * @package     Sitewards_B2BProfessional
9
 * @copyright   Copyright (c) 2014 Sitewards GmbH (http://www.sitewards.com/)
10
 */
11
class Sitewards_B2BProfessional_Model_System_Config_Source_Page extends Mage_Adminhtml_Model_System_Config_Source_Cms_Page
12
{
13
    /**
14
     * Populate an options array with the current system cms pages and the customer login page
15
     *
16
     * @return array
17
     */
18
    public function toOptionArray()
19
    {
20
        if (!$this->_options) {
21
            parent::toOptionArray();
22
            $aNewCmsOption = array(
23
                'value' => '',
24
                'label' => Mage::helper('sitewards_b2bprofessional')->__('-- Please Select --')
25
            );
26
27
            $aCustomerLogin = array(
28
                'value' => 'customer/account/login',
29
                'label' => Mage::helper('sitewards_b2bprofessional')->__('Customer Login')
30
            );
31
            array_unshift($this->_options, $aNewCmsOption, $aCustomerLogin);
32
        }
33
        return $this->_options;
34
    }
35
}