本文整理汇总了PHP中Thelia\Core\Template\Loop\Argument\Argument::createBooleanTypeArgument方法的典型用法代码示例。如果您正苦于以下问题:PHP Argument::createBooleanTypeArgument方法的具体用法?PHP Argument::createBooleanTypeArgument怎么用?PHP Argument::createBooleanTypeArgument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Thelia\Core\Template\Loop\Argument\Argument
的用法示例。
在下文中一共展示了Argument::createBooleanTypeArgument方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getArgDefinitions
/**
* @return \Thelia\Core\Template\Loop\Argument\ArgumentCollection
*/
protected function getArgDefinitions()
{
$collection = new ArgumentCollection(Argument::createIntListTypeArgument('id'), Argument::createIntListTypeArgument('exclude'), Argument::createBooleanOrBothTypeArgument('visible', 1), new Argument('order', new TypeCollection(new EnumListType(array('alpha', 'alpha-reverse', 'manual', 'manual-reverse', 'random'))), 'manual'), Argument::createIntTypeArgument('width'), Argument::createIntTypeArgument('height'), Argument::createIntTypeArgument('rotation', 0), Argument::createAnyTypeArgument('background_color'), Argument::createIntTypeArgument('quality'), new Argument('resize_mode', new TypeCollection(new EnumType(array('crop', 'borders', 'none'))), 'none'), Argument::createAnyTypeArgument('effects'), Argument::createIntTypeArgument('category'), Argument::createIntTypeArgument('product'), Argument::createIntTypeArgument('folder'), Argument::createIntTypeArgument('content'), Argument::createAnyTypeArgument('source'), Argument::createIntTypeArgument('source_id'), Argument::createBooleanTypeArgument('force_return', true), Argument::createBooleanTypeArgument('ignore_processing_errors', true));
// Add possible image sources
foreach ($this->possible_sources as $source) {
$collection->addArgument(Argument::createIntTypeArgument($source));
}
return $collection;
}
示例2: getArgDefinitions
/**
* @return \Thelia\Core\Template\Loop\Argument\ArgumentCollection
*/
protected function getArgDefinitions()
{
$collection = new ArgumentCollection(Argument::createIntListTypeArgument('id'), Argument::createIntListTypeArgument('exclude'), Argument::createBooleanOrBothTypeArgument('visible', 1), new Argument('order', new TypeCollection(new EnumListType(array('alpha', 'alpha-reverse', 'manual', 'manual-reverse', 'random'))), 'manual'), Argument::createIntTypeArgument('lang'), Argument::createIntTypeArgument('category'), Argument::createIntTypeArgument('product'), Argument::createIntTypeArgument('folder'), Argument::createIntTypeArgument('content'), Argument::createAnyTypeArgument('source'), Argument::createIntTypeArgument('source_id'), Argument::createBooleanTypeArgument('force_return', true));
// Add possible document sources
foreach ($this->possible_sources as $source) {
$collection->addArgument(Argument::createIntTypeArgument($source));
}
return $collection;
}
示例3: getDefaultArgs
/**
* Define common loop arguments
*
* @return Argument[]
*/
protected function getDefaultArgs()
{
$defaultArgs = [Argument::createBooleanTypeArgument('backend_context', false), Argument::createBooleanTypeArgument('force_return', false), Argument::createAnyTypeArgument('type'), Argument::createBooleanTypeArgument('no-cache', false)];
if (true === $this->countable) {
$defaultArgs = array_merge($defaultArgs, [Argument::createIntTypeArgument('offset', 0), Argument::createIntTypeArgument('page'), Argument::createIntTypeArgument('limit', PHP_INT_MAX)]);
}
if ($this instanceof SearchLoopInterface) {
$defaultArgs = array_merge($defaultArgs, [Argument::createAnyTypeArgument('search_term'), new Argument('search_in', new TypeCollection(new EnumListType($this->getSearchIn()))), new Argument('search_mode', new TypeCollection(new EnumType([SearchLoopInterface::MODE_ANY_WORD, SearchLoopInterface::MODE_SENTENCE, SearchLoopInterface::MODE_STRICT_SENTENCE])), SearchLoopInterface::MODE_STRICT_SENTENCE)]);
}
return $defaultArgs;
}
示例4: getArgDefinitions
public function getArgDefinitions()
{
return new ArgumentCollection(Argument::createIntListTypeArgument('id'), Argument::createBooleanTypeArgument('with_prev_next_info', false), Argument::createBooleanOrBothTypeArgument('visible', 1), Argument::createIntListTypeArgument('exclude'));
}
示例5: getArgDefinitions
/**
* @return ArgumentCollection
*/
protected function getArgDefinitions()
{
return new ArgumentCollection(Argument::createBooleanTypeArgument('current', 1), Argument::createIntListTypeArgument('id'), Argument::createBooleanTypeArgument('with_prev_next_info', false), new Argument('ref', new TypeCollection(new Type\AlphaNumStringListType())), Argument::createBooleanTypeArgument('reseller'), Argument::createIntTypeArgument('sponsor'), new Argument('order', new TypeCollection(new Type\EnumListType(array('id', 'id_reverse', 'reference', 'reference_reverse', 'firstname', 'firstname_reverse', 'lastname', 'lastname_reverse', 'last_order', 'last_order_reverse', 'order_amount', 'order_amount_reverse', 'registration_date', 'registration_date_reverse'))), 'lastname'), Argument::createBooleanOrBothTypeArgument("newsletter", Type\BooleanOrBothType::ANY));
}
示例6: getArgDefinitions
/**
* @return ArgumentCollection
*/
protected function getArgDefinitions()
{
return new ArgumentCollection(Argument::createIntListTypeArgument('id'), Argument::createIntTypeArgument('product'), Argument::createBooleanOrBothTypeArgument('visible', 1), Argument::createAnyTypeArgument('title'), Argument::createBooleanTypeArgument('current'), new Argument('order', new TypeCollection(new Type\EnumListType(array('id', 'id-reverse', 'alpha', 'alpha-reverse', 'manual', 'manual-reverse', 'random', 'created', 'created-reverse', 'updated', 'updated-reverse'))), 'alpha'), Argument::createIntListTypeArgument('exclude'));
}
示例7: getArgDefinitions
/**
* @return ArgumentCollection
*/
protected function getArgDefinitions()
{
return new ArgumentCollection(Argument::createIntListTypeArgument('id'), Argument::createIntTypeArgument('currency'), Argument::createIntTypeArgument('product'), Argument::createBooleanTypeArgument('promo'), Argument::createBooleanTypeArgument('new'), Argument::createBooleanTypeArgument('default'), Argument::createAnyTypeArgument('ref'), new Argument('attribute_availability', new TypeCollection(new Type\IntToCombinedIntsListType())), new Argument('order', new TypeCollection(new Type\EnumListType(array('quantity', 'quantity_reverse', 'min_price', 'max_price', 'promo', 'new', 'random'))), 'random'));
}
示例8: getArgDefinitions
/**
* @return ArgumentCollection
*/
protected function getArgDefinitions()
{
return new ArgumentCollection(Argument::createIntListTypeArgument('id'), Argument::createIntListTypeArgument('folder'), Argument::createIntListTypeArgument('folder_default'), Argument::createBooleanTypeArgument('current'), Argument::createBooleanTypeArgument('current_folder'), Argument::createBooleanTypeArgument('with_prev_next_info', false), Argument::createIntTypeArgument('depth', 1), Argument::createBooleanOrBothTypeArgument('visible', 1), Argument::createAnyTypeArgument('title'), new Argument('order', new TypeCollection(new Type\EnumListType(array('alpha', 'alpha-reverse', 'manual', 'manual_reverse', 'random', 'given_id', 'created', 'created_reverse', 'updated', 'updated_reverse', 'position', 'position_reverse'))), 'alpha'), Argument::createIntListTypeArgument('exclude'), Argument::createIntListTypeArgument('exclude_folder'));
}
示例9: getArgDefinitions
/**
* @return ArgumentCollection
*/
protected function getArgDefinitions()
{
return new ArgumentCollection(Argument::createIntListTypeArgument('id'), Argument::createIntListTypeArgument('parent'), Argument::createIntListTypeArgument('exclude_parent'), Argument::createIntListTypeArgument('product'), Argument::createIntListTypeArgument('exclude_product'), Argument::createIntListTypeArgument('content'), Argument::createBooleanTypeArgument('current'), Argument::createBooleanTypeArgument('not_empty', 0), Argument::createBooleanTypeArgument('with_prev_next_info', false), Argument::createBooleanTypeArgument('need_count_child', false), Argument::createBooleanTypeArgument('need_product_count', false), Argument::createBooleanOrBothTypeArgument('visible', 1), new Argument('order', new TypeCollection(new Type\EnumListType(array('id', 'id_reverse', 'alpha', 'alpha_reverse', 'manual', 'manual_reverse', 'visible', 'visible_reverse', 'random'))), 'manual'), Argument::createIntListTypeArgument('exclude'));
}
示例10: getArgDefinitions
/**
* @return ArgumentCollection
*/
protected function getArgDefinitions()
{
return new ArgumentCollection(Argument::createIntListTypeArgument('id'), Argument::createAnyListTypeArgument('code'), Argument::createAnyListTypeArgument('locale'), Argument::createIntListTypeArgument('exclude'), Argument::createBooleanTypeArgument('default_only', false), Argument::createBooleanTypeArgument('exclude_default', false), new Argument('order', new TypeCollection(new Type\EnumListType(array('id', 'id_reverse', 'alpha', 'alpha_reverse', 'position', 'position_reverse'))), 'position'));
}
示例11: getArgDefinitions
protected function getArgDefinitions()
{
return new ArgumentCollection(Argument::createIntTypeArgument('category_id'), Argument::createIntTypeArgument('product_id'), Argument::createBooleanTypeArgument('visible', false), Argument::createAnyTypeArgument('locale', 'en_US'), new Argument('product_order', new TypeCollection(new Type\EnumListType(['id', 'id_reverse', 'alpha', 'alpha_reverse', 'ref', 'ref_reverse', 'ean', 'ean_reverse'])), 'alpha'));
}
示例12: getArgDefinitions
/**
* Definition of loop arguments
*
* example :
*
* public function getArgDefinitions()
* {
* return new ArgumentCollection(
*
* Argument::createIntListTypeArgument('id'),
* new Argument(
* 'ref',
* new TypeCollection(
* new Type\AlphaNumStringListType()
* )
* ),
* Argument::createIntListTypeArgument('category'),
* Argument::createBooleanTypeArgument('new'),
* ...
* );
* }
*
* @return \Thelia\Core\Template\Loop\Argument\ArgumentCollection
*/
protected function getArgDefinitions()
{
return new ArgumentCollection(Argument::createIntListTypeArgument('order_id'), Argument::createIntListTypeArgument('order_product_id'), Argument::createIntListTypeArgument('id'), Argument::createBooleanTypeArgument('printed'), Argument::createAnyTypeArgument('file_name'), Argument::createIntListTypeArgument('sequence_number'), new Argument('group_by', new TypeCollection(new EnumListType(['package', 'sticker', 'order_product'])), 'id'));
}
示例13: getArgDefinitions
/**
*
* define all args used in your loop
*
*
* example :
*
* public function getArgDefinitions()
* {
* return new ArgumentCollection(
* Argument::createIntListTypeArgument('id'),
* new Argument(
* 'ref',
* new TypeCollection(
* new Type\AlphaNumStringListType()
* )
* ),
* Argument::createIntListTypeArgument('category'),
* Argument::createBooleanTypeArgument('new'),
* Argument::createBooleanTypeArgument('promo'),
* Argument::createFloatTypeArgument('min_price'),
* Argument::createFloatTypeArgument('max_price'),
* Argument::createIntTypeArgument('min_stock'),
* Argument::createFloatTypeArgument('min_weight'),
* Argument::createFloatTypeArgument('max_weight'),
* Argument::createBooleanTypeArgument('current'),
*
* );
* }
*
* @return \Thelia\Core\Template\Loop\Argument\ArgumentCollection
*/
public function getArgDefinitions()
{
return new ArgumentCollection(Argument::createBooleanTypeArgument('with_prev_next_info', false));
}
示例14: getArgDefinitions
protected function getArgDefinitions()
{
return parent::getArgDefinitions()->addArguments(array(Argument::createIntListTypeArgument("category"), Argument::createBooleanTypeArgument("return_empty", true)));
}
示例15: getArgDefinitions
/**
* @return ArgumentCollection
*/
protected function getArgDefinitions()
{
return new ArgumentCollection(Argument::createIntListTypeArgument('id'), Argument::createIntListTypeArgument('area'), Argument::createIntListTypeArgument('exclude_area'), Argument::createBooleanTypeArgument('with_area'), Argument::createIntListTypeArgument('exclude'));
}