-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/caching
- Loading branch information
Showing
7 changed files
with
139 additions
and
78 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,39 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Views hook implementations. | ||
*/ | ||
|
||
/** | ||
* Implements hook_views_data_alter(). | ||
*/ | ||
function embargo_views_data_alter(array &$data) { | ||
|
||
$data['node_field_data']['embargo__embargoes'] = [ | ||
'title' => \t('Embargoes'), | ||
'help' => \t('Embargoes applicable to the given node.'), | ||
'relationship' => [ | ||
'base' => 'embargo', | ||
'base field' => 'embargoed_node', | ||
'field' => 'nid', | ||
'id' => 'standard', | ||
'label' => \t('Embargoes'), | ||
], | ||
]; | ||
$data['users_field_data']['embargo__exempt_users'] = [ | ||
'title' => \t('Embargo exemptions'), | ||
'help' => \t('Embargoes for which the given user is specifically exempt.'), | ||
'relationship' => [ | ||
'id' => 'entity_reverse', | ||
'field_name' => 'embargo__exempt_users', | ||
'entity_type' => 'embargo', | ||
'field table' => 'embargo__exempt_users', | ||
'field field' => 'exempt_users_target_id', | ||
'base' => 'embargo', | ||
'base field' => 'id', | ||
'label' => \t('Embargo exemptions'), | ||
], | ||
]; | ||
|
||
} |
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,12 @@ | ||
<?php | ||
|
||
namespace Drupal\embargo; | ||
|
||
use Drupal\views\EntityViewsData; | ||
|
||
/** | ||
* Embargo IP range entity views data generation. | ||
*/ | ||
class EmbargoIpRangeViewsData extends EntityViewsData { | ||
|
||
} |
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,12 @@ | ||
<?php | ||
|
||
namespace Drupal\embargo; | ||
|
||
use Drupal\views\EntityViewsData; | ||
|
||
/** | ||
* Embargo entity views data generation. | ||
*/ | ||
class EmbargoViewsData extends EntityViewsData { | ||
|
||
} |
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