00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class Mage_Adminhtml_Block_Extensions_Custom_Edit_Tab_Depends
00035 extends Mage_Adminhtml_Block_Extensions_Custom_Edit_Tab_Abstract
00036 {
00037 public function __construct()
00038 {
00039 parent::__construct();
00040 $this->setTemplate('extensions/custom/depends.phtml');
00041 }
00042
00043 public function initForm()
00044 {
00045 $form = new Varien_Data_Form();
00046 $form->setHtmlIdPrefix('_depends');
00047
00048 $fieldset = $form->addFieldset('depends_php_fieldset', array('legend'=>Mage::helper('adminhtml')->__('PHP Version')));
00049
00050 $fieldset->addField('depends_php_min', 'text', array(
00051 'name' => 'depends_php_min',
00052 'label' => Mage::helper('adminhtml')->__('Minimum'),
00053 'required' => true,
00054 'value' => '5.2.0',
00055 ));
00056
00057 $fieldset->addField('depends_php_max', 'text', array(
00058 'name' => 'depends_php_max',
00059 'label' => Mage::helper('adminhtml')->__('Maximum'),
00060 'required' => true,
00061 'value' => '6.0.0',
00062 ));
00063
00064 $fieldset->addField('depends_php_recommended', 'text', array(
00065 'name' => 'depends_php_recommended',
00066 'label' => Mage::helper('adminhtml')->__('Recommended'),
00067 ));
00068
00069 $fieldset->addField('depends_php_exclude', 'text', array(
00070 'name' => 'depends_php_exclude',
00071 'label' => Mage::helper('adminhtml')->__('Exclude (comma separated)'),
00072 ));
00073
00074 $form->setValues($this->getData());
00075
00076 $this->setForm($form);
00077
00078 return $this;
00079 }
00080
00081 public function getPackages()
00082 {
00083 return array('Mage_Core'=>'Mage_Core');
00084 }
00085
00086 public function getExtensions()
00087 {
00088 $arr = array();
00089 foreach (get_loaded_extensions() as $ext) {
00090 $arr[$ext] = $ext;
00091 }
00092 asort($arr, SORT_STRING);
00093 return $arr;
00094 }
00095
00096 public function getDependTypes()
00097 {
00098 return array(
00099 'required'=>Mage::helper('adminhtml')->__('Required'),
00100 'optional'=>Mage::helper('adminhtml')->__('Optional'),
00101 'conflicts'=>Mage::helper('adminhtml')->__('Conflicts'),
00102 );
00103 }
00104 }