Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Oauth_Adminhtml_Oauth_Admin_TokenController
  • Mage_Oauth_Adminhtml_Oauth_AuthorizeController
  • Mage_Oauth_Adminhtml_Oauth_AuthorizedTokensController
  • Mage_Oauth_Adminhtml_Oauth_ConsumerController
  • Mage_Oauth_AuthorizeController
  • Mage_Oauth_Block_Adminhtml_Oauth_Admin_Token
  • Mage_Oauth_Block_Adminhtml_Oauth_Admin_Token_Grid
  • Mage_Oauth_Block_Adminhtml_Oauth_Authorize
  • Mage_Oauth_Block_Adminhtml_Oauth_Authorize_Button
  • Mage_Oauth_Block_Adminhtml_Oauth_AuthorizedTokens
  • Mage_Oauth_Block_Adminhtml_Oauth_AuthorizedTokens_Grid
  • Mage_Oauth_Block_Adminhtml_Oauth_Consumer
  • Mage_Oauth_Block_Adminhtml_Oauth_Consumer_Edit
  • Mage_Oauth_Block_Adminhtml_Oauth_Consumer_Edit_Form
  • Mage_Oauth_Block_Adminhtml_Oauth_Consumer_Grid
  • Mage_Oauth_Block_Authorize
  • Mage_Oauth_Block_Authorize_Abstract
  • Mage_Oauth_Block_Authorize_Button
  • Mage_Oauth_Block_Authorize_ButtonBaseAbstract
  • Mage_Oauth_Block_AuthorizeBaseAbstract
  • Mage_Oauth_Block_Customer_Token_List
  • Mage_Oauth_Customer_TokenController
  • Mage_Oauth_Exception
  • Mage_Oauth_Helper_Data
  • Mage_Oauth_InitiateController
  • Mage_Oauth_Model_Consumer
  • Mage_Oauth_Model_Consumer_Validator_KeyLength
  • Mage_Oauth_Model_Nonce
  • Mage_Oauth_Model_Observer
  • Mage_Oauth_Model_Resource_Consumer
  • Mage_Oauth_Model_Resource_Consumer_Collection
  • Mage_Oauth_Model_Resource_Nonce
  • Mage_Oauth_Model_Resource_Nonce_Collection
  • Mage_Oauth_Model_Resource_Setup
  • Mage_Oauth_Model_Resource_Token
  • Mage_Oauth_Model_Resource_Token_Collection
  • Mage_Oauth_Model_Server
  • Mage_Oauth_Model_Token
  • Mage_Oauth_TokenController
  • Overview
  • Package
  • Class
  • Tree
  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_Oauth
 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:  * OAuth consumer edit form block
 30:  *
 31:  * @category   Mage
 32:  * @package    Mage_Oauth
 33:  * @author     Magento Core Team <core@magentocommerce.com>
 34:  */
 35: class Mage_Oauth_Block_Adminhtml_Oauth_Consumer_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
 36: {
 37:     /**
 38:      * Consumer model
 39:      *
 40:      * @var Mage_Oauth_Model_Consumer
 41:      */
 42:     protected $_model;
 43: 
 44:     /**
 45:      * Get consumer model
 46:      *
 47:      * @return Mage_Oauth_Model_Consumer
 48:      */
 49:     public function getModel()
 50:     {
 51:         if (null === $this->_model) {
 52:             $this->_model = Mage::registry('current_consumer');
 53:         }
 54:         return $this->_model;
 55:     }
 56: 
 57:     /**
 58:      * Prepare form before rendering HTML
 59:      *
 60:      * @return Mage_Oauth_Block_Adminhtml_Oauth_Consumer_Edit_Form
 61:      */
 62:     protected function _prepareForm()
 63:     {
 64:         $model = $this->getModel();
 65:         $form = new Varien_Data_Form(array(
 66:             'id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post'
 67:         ));
 68: 
 69:         $fieldset = $form->addFieldset('base_fieldset', array(
 70:             'legend' => Mage::helper('oauth')->__('Consumer Information'), 'class' => 'fieldset-wide'
 71:         ));
 72: 
 73:         if ($model->getId()) {
 74:             $fieldset->addField('id', 'hidden', array('name' => 'id', 'value' => $model->getId()));
 75:         }
 76:         $fieldset->addField('name', 'text', array(
 77:             'name'      => 'name',
 78:             'label'     => Mage::helper('oauth')->__('Name'),
 79:             'title'     => Mage::helper('oauth')->__('Name'),
 80:             'required'  => true,
 81:             'value'     => $model->getName(),
 82:         ));
 83: 
 84:         $fieldset->addField('key', 'text', array(
 85:             'name'      => 'key',
 86:             'label'     => Mage::helper('oauth')->__('Key'),
 87:             'title'     => Mage::helper('oauth')->__('Key'),
 88:             'disabled'  => true,
 89:             'required'  => true,
 90:             'value'     => $model->getKey(),
 91:         ));
 92: 
 93:         $fieldset->addField('secret', 'text', array(
 94:             'name'      => 'secret',
 95:             'label'     => Mage::helper('oauth')->__('Secret'),
 96:             'title'     => Mage::helper('oauth')->__('Secret'),
 97:             'disabled'  => true,
 98:             'required'  => true,
 99:             'value'     => $model->getSecret(),
100:         ));
101: 
102:         $fieldset->addField('callback_url', 'text', array(
103:             'name'      => 'callback_url',
104:             'label'     => Mage::helper('oauth')->__('Callback URL'),
105:             'title'     => Mage::helper('oauth')->__('Callback URL'),
106:             'required'  => false,
107:             'value'     => $model->getCallbackUrl(),
108:             'class'     => 'validate-url',
109:         ));
110: 
111:         $fieldset->addField('rejected_callback_url', 'text', array(
112:             'name'      => 'rejected_callback_url',
113:             'label'     => Mage::helper('oauth')->__('Rejected Callback URL'),
114:             'title'     => Mage::helper('oauth')->__('Rejected Callback URL'),
115:             'required'  => false,
116:             'value'     => $model->getRejectedCallbackUrl(),
117:             'class'     => 'validate-url',
118:         ));
119: 
120:         $form->setAction($this->getUrl('*/*/save'));
121:         $form->setUseContainer(true);
122:         $this->setForm($form);
123: 
124:         return parent::_prepareForm();
125:     }
126: }
127: 
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0