Pimcore\Model\Object\ClassDefinition\CustomLayout::create PHP 메소드

create() 공개 정적인 메소드

public static create ( array $values = [] ) : CustomLayout
$values array
리턴 CustomLayout
    public static function create($values = [])
    {
        $class = new self();
        $class->setValues($values);
        return $class;
    }

Usage Example

예제 #1
0
 public function addCustomLayoutAction()
 {
     $customLayout = Object\ClassDefinition\CustomLayout::create(['name' => $this->getParam("name"), 'userOwner' => $this->user->getId(), "classId" => $this->getParam("classId")]);
     $customLayout->save();
     $this->_helper->json(["success" => true, "id" => $customLayout->getId(), "name" => $customLayout->getName(), "data" => $customLayout]);
 }