og-8.x-1.x-dev/src/Plugin/Action/PendingOgMembership.php
src/Plugin/Action/PendingOgMembership.php
<?php
declare(strict_types=1);
namespace Drupal\og\Plugin\Action;
use Drupal\Core\Action\Attribute\Action;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\og\OgMembershipInterface;
/**
* Sets the pending state on a group membership.
*/
#[Action(
id: 'og_membership_pending_action',
label: new TranslatableMarkup('Set the selected membership(s) to pending state'),
type: 'og_membership',
)]
class PendingOgMembership extends ChangeOgMembershipStateBase {
/**
* {@inheritdoc}
*/
public function getTargetState() {
return OgMembershipInterface::STATE_PENDING;
}
/**
* {@inheritdoc}
*/
public function getOriginalState() {
return NULL;
}
}
