Twig
- 2 ответа
- 0 вопросов
2
Вклад в тег
class ProductController extends Controller
{
private $service;
public function __construct(ServiceInterface $serviceInterface)
{
$this->service = $sserviceInterface;
}
}
// Bundle/.../Service.php
class Service extends ServiceInterface
{
...
}
// src/.../Resources/config/service.yml
services:
...
controller.product:
class: Bundle/Controller/ProdcutController
arguments: ["@service"]
bundle.service:
class: Bundle/Service
arguments: ["@other_service", "@another_service"]
bundle.another_service:
class: AnotherService
argum....
...
element.on('keyup', callback)
$(function() {
var func = function(){
var search = $("#search").val();
var len=search.toString().length;
if (len==null || len==0) {
$.ajax({
type: "POST",
url: "PHP/first.php",
cache: false,
success: function(response){
$("#resSearch").html(response);}
});
}
else{
$.ajax({
type: "POST",
url: "PHP/search.php",
data: {"search": search},
cache: false,
success: function(response){
$("#resSearch").html(response);}
});
}//else кончается
return false;
};
func();
$("#search").on('keyup', func);
});
<link href="{{ asset('bundles/admin/css/vendor.min.css') }}" rel="stylesheet" />