| @@ 91-101 (lines=11) @@ | ||
| 88 | * @param \Wordlift_Configuration_Service $configuration_service The {@link Wordlift_Configuration_Service} instance. |
|
| 89 | * @param \Wordlift_Entity_Uri_Service $entity_uri_service The {@link Wordlift_Entity_Uri_Service} instance. |
|
| 90 | */ |
|
| 91 | public function __construct( $entity_service, $configuration_service, $entity_uri_service ) { |
|
| 92 | ||
| 93 | $this->log = Wordlift_Log_Service::get_logger( get_class() ); |
|
| 94 | ||
| 95 | $this->entity_service = $entity_service; |
|
| 96 | $this->configuration_service = $configuration_service; |
|
| 97 | $this->entity_uri_service = $entity_uri_service; |
|
| 98 | ||
| 99 | self::$instance = $this; |
|
| 100 | ||
| 101 | } |
|
| 102 | ||
| 103 | /** |
|
| 104 | * Get the {@link Wordlift_Content_Filter_Service} singleton instance. |
|
| @@ 63-75 (lines=13) @@ | ||
| 60 | * @param string $post_type The post type, e.g. entity. |
|
| 61 | * @param string $slug The entity type slug, if the slug is empty, the default slug will be used. |
|
| 62 | */ |
|
| 63 | public function __construct( $post_type, $slug ) { |
|
| 64 | ||
| 65 | $this->log = Wordlift_Log_Service::get_logger( get_class() ); |
|
| 66 | ||
| 67 | $this->post_type = $post_type; |
|
| 68 | ||
| 69 | // We cannot assign an empty slug to the register_post_type function, therefore if the slug is empty we default |
|
| 70 | // to the type name. |
|
| 71 | $this->slug = $slug ?: $post_type; |
|
| 72 | ||
| 73 | self::$instance = $this; |
|
| 74 | ||
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * Get the entity type service singleton instance. |
|
| @@ 90-100 (lines=11) @@ | ||
| 87 | * @param \Wordlift_Relation_Service $relation_service The {@link Wordlift_Relation_Service} instance. |
|
| 88 | * @param \Wordlift_Entity_Uri_Service $entity_uri_service The {@link Wordlift_Entity_Uri_Service} instance. |
|
| 89 | */ |
|
| 90 | public function __construct( $ui_service, $relation_service, $entity_uri_service ) { |
|
| 91 | ||
| 92 | $this->log = Wordlift_Log_Service::get_logger( 'Wordlift_Entity_Service' ); |
|
| 93 | ||
| 94 | $this->ui_service = $ui_service; |
|
| 95 | $this->relation_service = $relation_service; |
|
| 96 | $this->entity_uri_service = $entity_uri_service; |
|
| 97 | ||
| 98 | // Set the singleton instance. |
|
| 99 | self::$instance = $this; |
|
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| 103 | * Get the singleton instance of the Entity service. |
|