create area loop and shipping conf events name

This commit is contained in:
Manuel Raynaud
2013-10-10 16:18:51 +02:00
parent 6bfca2c6b4
commit 8856cec55c
7 changed files with 330 additions and 85 deletions

View File

@@ -22,15 +22,16 @@
/*************************************************************************************/
namespace Thelia\Controller\Admin;
use Thelia\Core\Event\TheliaEvents;
/**
* Class ShippingConfigurationController
* @package Thelia\Controller\Admin
* @author Manuel Raynaud <mraynaud@openstudio.fr>
*/
class ShippingConfigurationController extends BaseAdminController
class ShippingConfigurationController extends AbstractCrudController
{
public function indexAction()
/* public function indexAction()
{
if (null !== $response = $this->checkAuth("admin.shipping-configuration.view")) return $response;
return $this->render("shipping-configuration", array("display_shipping_configuration" => 20));
@@ -41,5 +42,159 @@ class ShippingConfigurationController extends BaseAdminController
return $this->render("shipping-configuration-edit", array(
"shipping_configuration_id" => $shipping_configuration_id
));
}*/
public function __construct()
{
parent::__construct(
'area',
null,
null,
'admin.shipping.default',
'admin.shipping.create',
'admin.shipping.update',
'admin.shipping.delete',
TheliaEvents::SHIPPING_CREATE,
TheliaEvents::SHIPPING_UPDATE,
TheliaEvents::SHIPPING_DELETE
);
}
/**
* Return the creation form for this object
*/
protected function getCreationForm()
{
// TODO: Implement getCreationForm() method.
}
/**
* Return the update form for this object
*/
protected function getUpdateForm()
{
// TODO: Implement getUpdateForm() method.
}
/**
* Hydrate the update form for this object, before passing it to the update template
*
* @param unknown $object
*/
protected function hydrateObjectForm($object)
{
// TODO: Implement hydrateObjectForm() method.
}
/**
* Creates the creation event with the provided form data
*
* @param unknown $formData
*/
protected function getCreationEvent($formData)
{
// TODO: Implement getCreationEvent() method.
}
/**
* Creates the update event with the provided form data
*
* @param unknown $formData
*/
protected function getUpdateEvent($formData)
{
// TODO: Implement getUpdateEvent() method.
}
/**
* Creates the delete event with the provided form data
*/
protected function getDeleteEvent()
{
// TODO: Implement getDeleteEvent() method.
}
/**
* Return true if the event contains the object, e.g. the action has updated the object in the event.
*
* @param unknown $event
*/
protected function eventContainsObject($event)
{
// TODO: Implement eventContainsObject() method.
}
/**
* Get the created object from an event.
*
* @param unknown $createEvent
*/
protected function getObjectFromEvent($event)
{
// TODO: Implement getObjectFromEvent() method.
}
/**
* Load an existing object from the database
*/
protected function getExistingObject()
{
// TODO: Implement getExistingObject() method.
}
/**
* Returns the object label form the object event (name, title, etc.)
*
* @param unknown $object
*/
protected function getObjectLabel($object)
{
// TODO: Implement getObjectLabel() method.
}
/**
* Returns the object ID from the object
*
* @param unknown $object
*/
protected function getObjectId($object)
{
// TODO: Implement getObjectId() method.
}
/**
* Render the main list template
*
* @param unknown $currentOrder, if any, null otherwise.
*/
protected function renderListTemplate($currentOrder)
{
return $this->render("shipping-configuration");
}
/**
* Render the edition template
*/
protected function renderEditionTemplate()
{
// TODO: Implement renderEditionTemplate() method.
}
/**
* Redirect to the edition template
*/
protected function redirectToEditionTemplate()
{
// TODO: Implement redirectToEditionTemplate() method.
}
/**
* Redirect to the list template
*/
protected function redirectToListTemplate()
{
return $this->render("shipping-configuration");
}
}