Created
April 13, 2012 10:41
-
-
Save rande/2375707 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// service | |
interface BlockExecuteFactoryInterface | |
{ | |
function getExecutionContext(BlockInterface $block); | |
} | |
// object, one per block | |
interface BlockExecutionContextInterface | |
{ | |
/** | |
* @return Response | |
*/ | |
function execute(array $parameters); | |
/** | |
* @return \Sonata\BlockBundle\Model\BlockInterface $block | |
*/ | |
function getBlock(); | |
/** | |
* @return array | |
*/ | |
function getCacheKeys() | |
/** | |
* @param string $name | |
* @param string $value | |
* @return void | |
*/ | |
function addParameter($name, $value); | |
} | |
interface BlockServiceInterface | |
{ | |
/** | |
* @param \Sonata\AdminBundle\Form\FormMapper $form | |
* @param \Sonata\BlockBundle\Model\BlockInterface $block | |
* @return void | |
*/ | |
function buildEditForm(FormMapper $form, BlockInterface $block); | |
/** | |
* @param \Sonata\AdminBundle\Form\FormMapper $form | |
* @param \Sonata\BlockBundle\Model\BlockInterface $block | |
* @return void | |
*/ | |
function buildCreateForm(FormMapper $form, BlockInterface $block); | |
/** | |
* @param \Sonata\BlockBundle\Execution\BlockExecutionContextInterface $block | |
* @return void | |
*/ | |
function build(BlockExecutionContextInterface $block); | |
/** | |
* @param \Sonata\AdminBundle\Validator\ErrorElement $errorElement | |
* @param \Sonata\BlockBundle\Model\BlockInterface $block | |
* @return void | |
*/ | |
function validateBlock(ErrorElement $errorElement, BlockInterface $block); | |
/** | |
* @return string | |
*/ | |
function getName(); | |
/** | |
* Returns the default settings link to the service | |
* | |
* @return array | |
*/ | |
function getDefaultSettings(); | |
/** | |
* @param \Sonata\BlockBundle\Model\BlockInterface $block | |
* @return void | |
*/ | |
function load(BlockInterface $block); | |
/** | |
* @param $media | |
* @return array | |
*/ | |
function getJavacripts($media); | |
/** | |
* @param $media | |
* @return array | |
*/ | |
function getStylesheets($media); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment