create()
+ +create(\Thelia\Core\Event\ActionEvent $event)
+ + + + +
Parameters
+| \Thelia\Core\Event\ActionEvent | +$event | ++ | +
diff --git a/documentation/api/classes/Thelia.Action.Category.html b/documentation/api/classes/Thelia.Action.Category.html new file mode 100644 index 000000000..c2a3d2a18 --- /dev/null +++ b/documentation/api/classes/Thelia.Action.Category.html @@ -0,0 +1,2035 @@ + + +
+ + ++ + + +
create(\Thelia\Core\Event\ActionEvent $event)
+ + + + +
| \Thelia\Core\Event\ActionEvent | +$event | ++ | +
modify(\Thelia\Core\Event\ActionEvent $event)
+ + + + +
| \Thelia\Core\Event\ActionEvent | +$event | ++ | +
delete(\Thelia\Core\Event\ActionEvent $event)
+ Delete a category
+ + + +| \Thelia\Core\Event\ActionEvent | +$event | ++ | +
toggleVisibility(\Thelia\Core\Event\ActionEvent $event)
+ Toggle category visibility. No form used here
+ + + +| \Thelia\Core\Event\ActionEvent | +$event | ++ | +
getSubscribedEvents() : array+
Returns an array of event names this subscriber listens to.
+The array keys are event names and the value can be:
+ +For instance:
+ +The event names to listen to
+ +validateForm(\Thelia\Form\BaseForm $aBaseForm, $expectedMethod)+
+ + + +
| \Thelia\Form\BaseForm | +$aBaseForm | ++ | +
| + | $expectedMethod | ++ | +
propagateFormError(\Thelia\Form\BaseForm $aBaseForm, string $error_message, \Thelia\Core\Event\ActionEvent $event)+
+ + + +
| \Thelia\Form\BaseForm | +$aBaseForm | ++ | +
| string | +$error_message | ++ | +
| \Thelia\Core\Event\ActionEvent | +$event | ++ | +
+ + + +
+ + + +
Base class used for internal event like creating new Customer, adding item to cart, etc
+Class InternalEvent
+ + +__construct(\Thelia\Model\Category $category)
+ + + + +
| \Thelia\Model\Category | +$category | ++ | +
+ + + +
Category tree loop, to get a category tree from a given category to a given depth.
+$securityContext : \Thelia\Core\Security\SecurityContext+
+ + + +
exec(mixed $pagination) : mixed
+ this function have to be implement in your own loop class.
+All your parameters are defined in defineArgs() and can be accessible like a class property.
+ +example :
+ +public function defineArgs() +{ + return array ( + "ref", + "id" => "optional", + "stock" => array( + "optional", + "default" => 10 + ) + ); +}
+ +you can retrieve ref value using $this->ref
+ + +| mixed | +$pagination | ++ | +
__construct(\Symfony\Component\HttpFoundation\Request $request, \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, \Thelia\Core\Security\SecurityContext $securityContext)+
Create a new Loop
+ + + +| \Symfony\Component\HttpFoundation\Request | +$request | ++ | +
| \Symfony\Component\EventDispatcher\EventDispatcherInterface | +$dispatcher | ++ | +
| \Thelia\Core\Security\SecurityContext | +$securityContext | ++ | +
__call(string $name, mixed $arguments) : null+
Provides a getter to loop parameters
+ + + +| string | +$name | +the methode name (only getArgname is supported) + |
+
| mixed | +$arguments | +this parameter is ignored + |
+
if the parameter is unknown or the method name is not supported.
+initializeArgs(array $nameValuePairs)
+ Initialize the loop arguments.
+ + + +| array | +$nameValuePairs | +a array of name => value pairs. The name is the name of the argument. + |
+
if somùe argument values are missing, or invalid
+getArg(string $argumentName) : \Thelia\Core\Template\Loop\Argument\Argument
+ Return a loop argument
+ + + +| string | +$argumentName | +the argument name + |
+
if argument is not found in loop argument list
+the loop argument.
+ +getArgValue(string $argumentName) : \Thelia\Core\Template\Loop\Argument\Argument
+ Return a loop argument value
+ + + +| string | +$argumentName | +the argument name + |
+
if argument is not found in loop argument list
+the loop argument.
+ +getArgDefinitions() : \Thelia\Core\Template\Loop\Argument\ArgumentCollection+
define all args used in your loop
+array key is your arg name.
+ +example :
+ +return array ( + "ref", + "id" => "optional", + "stock" => array( + "optional", + "default" => 10 + ) +);
+ + + + +buildCategoryTree( $parent, $visible, $level, $max_level, array $exclude, \Thelia\Core\Template\Element\LoopResult $loopResult)+
+ + + +
| + | $parent | ++ | +
| + | $visible | ++ | +
| + | $level | ++ | +
| + | $max_level | ++ | +
| array | +$exclude | ++ | +
| \Thelia\Core\Template\Element\LoopResult | +$loopResult | ++ | +
Language loop, to get a list of available languages
+$securityContext : \Thelia\Core\Security\SecurityContext+
+ + + +
exec(mixed $pagination) : mixed
+ this function have to be implement in your own loop class.
+All your parameters are defined in defineArgs() and can be accessible like a class property.
+ +example :
+ +public function defineArgs() +{ + return array ( + "ref", + "id" => "optional", + "stock" => array( + "optional", + "default" => 10 + ) + ); +}
+ +you can retrieve ref value using $this->ref
+ + +| mixed | +$pagination | ++ | +
__construct(\Symfony\Component\HttpFoundation\Request $request, \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, \Thelia\Core\Security\SecurityContext $securityContext)+
Create a new Loop
+ + + +| \Symfony\Component\HttpFoundation\Request | +$request | ++ | +
| \Symfony\Component\EventDispatcher\EventDispatcherInterface | +$dispatcher | ++ | +
| \Thelia\Core\Security\SecurityContext | +$securityContext | ++ | +
__call(string $name, mixed $arguments) : null+
Provides a getter to loop parameters
+ + + +| string | +$name | +the methode name (only getArgname is supported) + |
+
| mixed | +$arguments | +this parameter is ignored + |
+
if the parameter is unknown or the method name is not supported.
+initializeArgs(array $nameValuePairs)
+ Initialize the loop arguments.
+ + + +| array | +$nameValuePairs | +a array of name => value pairs. The name is the name of the argument. + |
+
if somùe argument values are missing, or invalid
+getArg(string $argumentName) : \Thelia\Core\Template\Loop\Argument\Argument
+ Return a loop argument
+ + + +| string | +$argumentName | +the argument name + |
+
if argument is not found in loop argument list
+the loop argument.
+ +getArgValue(string $argumentName) : \Thelia\Core\Template\Loop\Argument\Argument
+ Return a loop argument value
+ + + +| string | +$argumentName | +the argument name + |
+
if argument is not found in loop argument list
+the loop argument.
+ +getArgDefinitions() : \Thelia\Core\Template\Loop\Argument\ArgumentCollection+
define all args used in your loop
+array key is your arg name.
+ +example :
+ +return array ( + "ref", + "id" => "optional", + "stock" => array( + "optional", + "default" => 10 + ) +);
+ + + + ++ + + +
getSuccessUrl(string $default) : string
+ Returns the absolute URL to redirect the user to if the form is successfully processed.
+ + + +| string | +$default | +the default URL. If not given, the configured base URL is used. + |
+
an absolute URL
+ +buildForm() : null+
in this function you add all the fields you need for your Form.
+Form this you have to call add method on $this->formBuilder attribute :
+ +$this->formBuilder->add("name", "text") + ->add("email", "email", array( + "attr" => array( + "class" => "field" + ), + "label" => "email", + "constraints" => array( + new \Symfony\Component\Validator\Constraints\NotBlank() + ) + ) + ) + ->add('age', 'integer');
+ + + + ++ + + +
getSuccessUrl(string $default) : string
+ Returns the absolute URL to redirect the user to if the form is successfully processed.
+ + + +| string | +$default | +the default URL. If not given, the configured base URL is used. + |
+
an absolute URL
+ +buildForm() : null+
in this function you add all the fields you need for your Form.
+Form this you have to call add method on $this->formBuilder attribute :
+ +$this->formBuilder->add("name", "text") + ->add("email", "email", array( + "attr" => array( + "class" => "field" + ), + "label" => "email", + "constraints" => array( + new \Symfony\Component\Validator\Constraints\NotBlank() + ) + ) + ) + ->add('age', 'integer');
+ + + + +This filter accepts either a boolean value, or '*' which means both, true and false
+ + + ++ + + + + +
| FormValidationException | ++ |
+ + + + + +
| CategoryEvent | +Base class used for internal event like creating new Customer, adding item to cart, etc | +
+ + + + + +
| AuthorizationException | ++ |
+ + + + + +
| CategoryTree | +Category tree loop, to get a category tree from a given category to a given depth. | +
+ + + + + +
| Lang | +Language loop, to get a list of available languages | +
+ + + + + +
| BooleanOrBothType | +This filter accepts either a boolean value, or '*' which means both, true and false | +