Skip to content

Commit

Permalink
Merge pull request #4719 from izayoi256/feature/generate-plugin-entit…
Browse files Browse the repository at this point in the history
…y-exists

プラグイン生成コマンドによって生成されるEntityでclass_existsをチェックするよう変更
  • Loading branch information
okazy authored Nov 5, 2020
2 parents 17c0b7f + 9a8cd90 commit 9de60f8
Showing 1 changed file with 45 additions and 43 deletions.
88 changes: 45 additions & 43 deletions src/Eccube/Command/PluginGenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,56 +396,58 @@ public function index(Request \$request)
use Doctrine\\ORM\\Mapping as ORM;
/**
* Config
*
* @ORM\Table(name="plg_${snakecased}_config")
* @ORM\Entity(repositoryClass="Plugin\\${code}\\Repository\\ConfigRepository")
*/
class Config
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", options={"unsigned":true})
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private \$id;
if (!class_exists('\\Plugin\\${code}\\Entity\\Config', false)) {
/**
* @var string
* Config
*
* @ORM\Column(name="name", type="string", length=255)
*/
private \$name;
/**
* @return int
* @ORM\Table(name="plg_${snakecased}_config")
* @ORM\Entity(repositoryClass="Plugin\\${code}\\Repository\\ConfigRepository")
*/
public function getId()
class Config
{
return \$this->id;
}
/**
* @var int
*
* @ORM\Column(name="id", type="integer", options={"unsigned":true})
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private \$id;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255)
*/
private \$name;
/**
* @return int
*/
public function getId()
{
return \$this->id;
}
/**
* @return string
*/
public function getName()
{
return \$this->name;
}
/**
* @return string
*/
public function getName()
{
return \$this->name;
}
/**
* @param string \$name
*
* @return \$this;
*/
public function setName(\$name)
{
\$this->name = \$name;
/**
* @param string \$name
*
* @return \$this;
*/
public function setName(\$name)
{
\$this->name = \$name;
return \$this;
return \$this;
}
}
}
Expand Down

0 comments on commit 9de60f8

Please sign in to comment.