-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic configuration for content bundle storage
- Loading branch information
1 parent
37e9da7
commit c137268
Showing
13 changed files
with
345 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
|
||
namespace Sulu\Bundle\ArticleBundle\Article\Domain\Model; | ||
|
||
use Ramsey\Uuid\Uuid; | ||
use Sulu\Component\Persistence\Model\AuditableTrait; | ||
|
||
class Article implements ArticleInterface | ||
{ | ||
use AuditableTrait; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $id; | ||
|
||
public function __construct( | ||
?string $id = null | ||
) { | ||
$this->id = $id ?: Uuid::uuid4()->toString(); | ||
} | ||
|
||
public function getId(): string | ||
{ | ||
return $this->id; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Sulu\Bundle\ArticleBundle\Article\Domain\Model; | ||
|
||
use Sulu\Component\Persistence\Model\AuditableInterface; | ||
|
||
interface ArticleInterface extends AuditableInterface | ||
{ | ||
public const TEMPLATE_TYPE = 'article'; | ||
public const RESOURCE_KEY = 'article'; | ||
|
||
public function getId(): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
<mapped-superclass | ||
name="Sulu\Bundle\ArticleBundle\Article\Domain\Model\Article" | ||
table="ar_articles" | ||
repository-class="Sulu\Component\Persistence\Repository\ORM\EntityRepository" | ||
> | ||
<id name="id" type="string" column="id"> | ||
<generator strategy="NONE"/> | ||
</id> | ||
</mapped-superclass> | ||
</doctrine-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.