-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from openeuropa/update-EPIC-EWPP-1552-default…
…-related-lists Update epic EWPP-1552: Default related lists
- Loading branch information
Showing
8 changed files
with
492 additions
and
7 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
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
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,88 @@ | ||
<?php | ||
|
||
declare(strict_types = 1); | ||
|
||
namespace Drupal\oe_list_pages; | ||
|
||
use Symfony\Component\EventDispatcher\Event; | ||
|
||
/** | ||
* Event thrown in order to determine sort options. | ||
*/ | ||
class ListPageSortAlterEvent extends Event { | ||
|
||
/** | ||
* The entity type. | ||
* | ||
* @var string | ||
*/ | ||
protected $entityType; | ||
|
||
/** | ||
* The bundle. | ||
* | ||
* @var string | ||
*/ | ||
protected $bundle; | ||
|
||
/** | ||
* The sorting options. | ||
* | ||
* @var array | ||
*/ | ||
protected $options = []; | ||
|
||
/** | ||
* Constructs a new ListPageSourceAlterEvent. | ||
* | ||
* @param string $entity_type | ||
* The The entity type. | ||
* @param string $bundle | ||
* The bundle. | ||
*/ | ||
public function __construct(string $entity_type, string $bundle) { | ||
$this->entityType = $entity_type; | ||
$this->bundle = $bundle; | ||
} | ||
|
||
/** | ||
* Returns the entity type. | ||
* | ||
* @return string | ||
* The entity type. | ||
*/ | ||
public function getEntityType(): string { | ||
return $this->entityType; | ||
} | ||
|
||
/** | ||
* Returns the bundle. | ||
* | ||
* @return string | ||
* The bundle. | ||
*/ | ||
public function getBundle(): string { | ||
return $this->bundle; | ||
} | ||
|
||
/** | ||
* Returns the sort options. | ||
* | ||
* @return array | ||
* The sort options. | ||
*/ | ||
public function getOptions(): array { | ||
return $this->options; | ||
} | ||
|
||
/** | ||
* Sets the sort information. | ||
* | ||
* @param array $options | ||
* The sort options. | ||
*/ | ||
public function setOptions(array $options): void { | ||
$this->options = $options; | ||
} | ||
|
||
} |
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
Oops, something went wrong.