119 lines
4.1 KiB
PHP
119 lines
4.1 KiB
PHP
<?php
|
|
|
|
use_helper('Asset', 'stPrice', 'I18N', 'stProductImage', 'stCurrency', 'stText', 'stCategory', 'stProducer');
|
|
|
|
function object_product_mytabs1(Product $product, $options = array())
|
|
{
|
|
$request = sfContext::getInstance()->getRequest();
|
|
|
|
if ($request->hasErrors())
|
|
{
|
|
$parameters = $request->getParameter($options['control_name']);
|
|
$defaults = stJQueryToolsHelper::parseTokensFromRequest($parameters);
|
|
}
|
|
else
|
|
{
|
|
$defaults = ProductHasTab1Peer::doSelectTab1ForTokenInput($product);
|
|
}
|
|
|
|
$results_formatter = _token_input_product_results_formatter();
|
|
|
|
$token_formatter = _token_input_product_token_formatter();
|
|
|
|
return st_tokenizer_input_tag($options['control_name'], st_url_for('@stProductEdit?action=ajaxProductsToken&id='.$product->getId()), $defaults, array('tokenizer' => array(
|
|
'preventDuplicates' => true,
|
|
'resultsFormatter' => $results_formatter,
|
|
'tokenFormatter' => $token_formatter,
|
|
'hintText' => __('Wpisz kod/nazwę szukanego produktu'),
|
|
'additionalDataFields' => array('code'),
|
|
'tokenLimit' => 20,
|
|
'sortable' => true
|
|
)));
|
|
}
|
|
|
|
function object_product_mytabs2(Product $product, $options = array())
|
|
{
|
|
$request = sfContext::getInstance()->getRequest();
|
|
|
|
if ($request->hasErrors())
|
|
{
|
|
$parameters = $request->getParameter($options['control_name']);
|
|
$defaults = stJQueryToolsHelper::parseTokensFromRequest($parameters);
|
|
}
|
|
else
|
|
{
|
|
$defaults = ProductHasTab2Peer::doSelectTab2ForTokenInput($product);
|
|
}
|
|
|
|
$results_formatter = _token_input_product_results_formatter();
|
|
|
|
$token_formatter = _token_input_product_token_formatter();
|
|
|
|
return st_tokenizer_input_tag($options['control_name'], st_url_for('@stProductEdit?action=ajaxProductsToken&id='.$product->getId()), $defaults, array('tokenizer' => array(
|
|
'preventDuplicates' => true,
|
|
'resultsFormatter' => $results_formatter,
|
|
'tokenFormatter' => $token_formatter,
|
|
'hintText' => __('Wpisz kod/nazwę szukanego produktu'),
|
|
'additionalDataFields' => array('code'),
|
|
'tokenLimit' => 20,
|
|
'sortable' => true
|
|
)));
|
|
}
|
|
|
|
function object_product_mytabs3(Product $product, $options = array())
|
|
{
|
|
$request = sfContext::getInstance()->getRequest();
|
|
|
|
if ($request->hasErrors())
|
|
{
|
|
$parameters = $request->getParameter($options['control_name']);
|
|
$defaults = stJQueryToolsHelper::parseTokensFromRequest($parameters);
|
|
}
|
|
else
|
|
{
|
|
$defaults = ProductHasTab3Peer::doSelectTab3ForTokenInput($product);
|
|
}
|
|
|
|
$results_formatter = _token_input_product_results_formatter();
|
|
|
|
$token_formatter = _token_input_product_token_formatter();
|
|
|
|
return st_tokenizer_input_tag($options['control_name'], st_url_for('@stProductEdit?action=ajaxProductsToken&id='.$product->getId()), $defaults, array('tokenizer' => array(
|
|
'preventDuplicates' => true,
|
|
'resultsFormatter' => $results_formatter,
|
|
'tokenFormatter' => $token_formatter,
|
|
'hintText' => __('Wpisz kod/nazwę szukanego produktu'),
|
|
'additionalDataFields' => array('code'),
|
|
'tokenLimit' => 20,
|
|
'sortable' => true
|
|
)));
|
|
}
|
|
|
|
function object_product_mytabs4(Product $product, $options = array())
|
|
{
|
|
$request = sfContext::getInstance()->getRequest();
|
|
|
|
if ($request->hasErrors())
|
|
{
|
|
$parameters = $request->getParameter($options['control_name']);
|
|
$defaults = stJQueryToolsHelper::parseTokensFromRequest($parameters);
|
|
}
|
|
else
|
|
{
|
|
$defaults = ProductHasTab4Peer::doSelectTab4ForTokenInput($product);
|
|
}
|
|
|
|
$results_formatter = _token_input_product_results_formatter();
|
|
|
|
$token_formatter = _token_input_product_token_formatter();
|
|
|
|
return st_tokenizer_input_tag($options['control_name'], st_url_for('@stProductEdit?action=ajaxProductsToken&id='.$product->getId()), $defaults, array('tokenizer' => array(
|
|
'preventDuplicates' => true,
|
|
'resultsFormatter' => $results_formatter,
|
|
'tokenFormatter' => $token_formatter,
|
|
'hintText' => __('Wpisz kod/nazwę szukanego produktu'),
|
|
'additionalDataFields' => array('code'),
|
|
'tokenLimit' => 20,
|
|
'sortable' => true
|
|
)));
|
|
} |