Public Member Functions | |
__construct () | |
getShipment () | |
getHeaderText () | |
getBackUrl () | |
getEmailUrl () | |
getPrintUrl () | |
updateBackButtonUrl ($flag) |
Definition at line 34 of file View.php.
__construct | ( | ) |
Constructor
By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes
Reimplemented from Mage_Adminhtml_Block_Widget_Form_Container.
Definition at line 37 of file View.php.
00038 { 00039 $this->_objectId = 'shipment_id'; 00040 $this->_controller = 'sales_order_shipment'; 00041 $this->_mode = 'view'; 00042 00043 parent::__construct(); 00044 00045 $this->_removeButton('reset'); 00046 $this->_removeButton('delete'); 00047 $this->_updateButton('save', 'label', Mage::helper('sales')->__('Send Tracking Information')); 00048 $this->_updateButton('save', 'onclick', "setLocation('".$this->getEmailUrl()."')"); 00049 00050 if ($this->getShipment()->getId()) { 00051 $this->_addButton('print', array( 00052 'label' => Mage::helper('sales')->__('Print'), 00053 'class' => 'save', 00054 'onclick' => 'setLocation(\''.$this->getPrintUrl().'\')' 00055 ) 00056 ); 00057 } 00058 }
getBackUrl | ( | ) |
Get URL for back (reset) button
Reimplemented from Mage_Adminhtml_Block_Widget_Form_Container.
Definition at line 83 of file View.php.
00084 { 00085 return $this->getUrl( 00086 '*/sales_order/view', 00087 array( 00088 'order_id' => $this->getShipment()->getOrderId(), 00089 'active_tab'=> 'order_shipments' 00090 )); 00091 }
getEmailUrl | ( | ) |
getHeaderText | ( | ) |
Get header text
Reimplemented from Mage_Adminhtml_Block_Widget_Container.
Definition at line 70 of file View.php.
00071 { 00072 if ($this->getShipment()->getEmailSent()) { 00073 $emailSent = Mage::helper('sales')->__('Shipment email sent'); 00074 } 00075 else { 00076 $emailSent = Mage::helper('sales')->__('Shipment email not sent'); 00077 } 00078 00079 $header = Mage::helper('sales')->__('Shipment #%s (%s)', $this->getShipment()->getIncrementId(), $emailSent); 00080 return $header; 00081 }
getPrintUrl | ( | ) |
getShipment | ( | ) |
Retrieve shipment model instance
Definition at line 65 of file View.php.
00066 { 00067 return Mage::registry('current_shipment'); 00068 }
updateBackButtonUrl | ( | $ | flag | ) |
Definition at line 105 of file View.php.
00106 { 00107 if ($flag) { 00108 return $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('*/sales_shipment/') . '\')'); 00109 } 00110 return $this; 00111 }