Removed debugging code and changed default name of organisation relation
This commit is contained in:
parent
42bf2c8e77
commit
b1a8534d29
@ -107,7 +107,7 @@ class OCOrganisationRelation extends ContentEntityBase implements OCOrganisation
|
|||||||
'max_length' => 50,
|
'max_length' => 50,
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
])
|
])
|
||||||
->setDefaultValue('Link between organisations')
|
->setDefaultValue('Link')
|
||||||
->setRequired(TRUE);
|
->setRequired(TRUE);
|
||||||
|
|
||||||
$fields['created'] = BaseFieldDefinition::create('created')
|
$fields['created'] = BaseFieldDefinition::create('created')
|
||||||
|
@ -23,7 +23,6 @@ class EntityReferenceCurrentTargetExcluder extends EntityReferenceLabelFormatter
|
|||||||
foreach($items as $delta=>$item) {
|
foreach($items as $delta=>$item) {
|
||||||
$current_org = \Drupal::routeMatch()->getParameter('oc_organisation')->id();
|
$current_org = \Drupal::routeMatch()->getParameter('oc_organisation')->id();
|
||||||
$item_target_id = $item->get('target_id')->getValue();
|
$item_target_id = $item->get('target_id')->getValue();
|
||||||
\Drupal::logger("foo")->error($current_org . " " . $item_target_id);
|
|
||||||
if ($current_org == $item_target_id) {
|
if ($current_org == $item_target_id) {
|
||||||
$items->removeItem($delta);
|
$items->removeItem($delta);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user