| 1 | <?php |
||
| 10 | class BlockService |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var BlockRepository |
||
| 14 | */ |
||
| 15 | private $blockRepository; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * BlockService constructor. |
||
| 19 | * |
||
| 20 | * @param BlockRepository $blockRepository |
||
| 21 | */ |
||
| 22 | public function __construct(BlockRepository $blockRepository) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Fetch by. |
||
| 29 | * |
||
| 30 | * @param array $where |
||
| 31 | * |
||
| 32 | * @return BlockEntity[] |
||
| 33 | */ |
||
| 34 | public function fetchBy(array $where = []) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Creates a page in the database. |
||
| 47 | * |
||
| 48 | * @param BlockEntity $entity |
||
| 49 | * |
||
| 50 | * @return BlockEntity |
||
| 51 | */ |
||
| 52 | public function create(BlockEntity $entity) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Update a page in the database. |
||
| 59 | * |
||
| 60 | * @param BlockEntity $entity |
||
| 61 | * |
||
| 62 | * @return BlockEntity |
||
| 63 | */ |
||
| 64 | public function update(BlockEntity $entity) |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Removes a page from the database. |
||
| 71 | * |
||
| 72 | * @param BlockEntity $entity |
||
| 73 | * |
||
| 74 | * @return BlockEntity |
||
| 75 | */ |
||
| 76 | public function remove(BlockEntity $entity) |
||
| 80 | } |
||
| 81 |