Pimcore\Model\Object\Classificationstore\GroupConfig::setStoreId PHP Méthode

setStoreId() public méthode

public setStoreId ( integer $storeId )
$storeId integer
    public function setStoreId($storeId)
    {
        $this->storeId = $storeId;
    }

Usage Example

 public function createGroupAction()
 {
     $name = $this->getParam("name");
     $storeId = $this->getParam("storeId");
     $alreadyExist = false;
     $config = Classificationstore\GroupConfig::getByName($name, $storeId);
     if (!$config) {
         $config = new Classificationstore\GroupConfig();
         $config->setStoreId($storeId);
         $config->setName($name);
         $config->save();
     }
     $this->_helper->json(["success" => !$alreadyExist, "id" => $config->getName()]);
 }