create() public static méthode

public static create ( Pimcore\Model\Element\ElementInterface $element, User $user )
$element Pimcore\Model\Element\ElementInterface
$user Pimcore\Model\User
 public function addAction()
 {
     $element = Element\Service::getElementById($this->getParam("type"), $this->getParam("id"));
     if ($element) {
         $type = Element\Service::getElementType($element);
         $listClass = "\\Pimcore\\Model\\" . ucfirst($type) . "\\Listing";
         $list = new $listClass();
         $list->setCondition(($type == "object" ? "o_" : "") . "path LIKE '" . $element->getFullPath() . "/%'");
         $children = $list->getTotalCount();
         if ($children <= 100) {
             Recyclebin\Item::create($element, $this->getUser());
         }
         $this->_helper->json(array("success" => true));
     } else {
         $this->_helper->json(array("success" => false));
     }
 }