You are here

public static function SchemaActionTrait::actionObjects in Schema.org Metatag 8

Return an array of all actions for an action type.

Parameters

string $action_type: The type of action.

Return value

array An array of all the actions for the specified type.

1 call to SchemaActionTrait::actionObjects()
SchemaActionTrait::getAllActions in src/Plugin/metatag/Tag/SchemaActionTrait.php
Get an array of all actions, grouped by action type.

File

src/Plugin/metatag/Tag/SchemaActionTrait.php, line 243

Class

SchemaActionTrait
Schema.org Action trait.

Namespace

Drupal\schema_metatag\Plugin\metatag\Tag

Code

public static function actionObjects($action_type) {
  switch ($action_type) {
    case 'MoveAction':
      return [
        'MoveAction',
        'TravelAction',
        'DepartAction',
        'ArriveAction',
      ];
    case 'TransferAction':
      return [
        'TransferAction',
        'DownloadAction',
        'LendAction',
        'GiveAction',
        'ReceiveAction',
        'SendAction',
        'BorrowAction',
        'ReturnAction',
        'TakeAction',
      ];
    case 'TradeAction':
      return [
        'TradeAction',
        'BuyAction',
        'QuoteAction',
        'SellAction',
        'PayAction',
        'RentAction',
        'DonateAction',
        'OrderAction',
        'TipAction',
      ];
    case 'ControlAction':
      return [
        'ControlAction',
        'ResumeAction',
        'DeactivateAction',
        'ActivateAction',
        'SuspendAction',
      ];
    case 'AchieveAction':
      return [
        'AchieveAction',
        'WinAction',
        'LoseAction',
        'TieAction',
      ];
    case 'OrganizeAction':
      return [
        'OrganizeAction',
        'PlanAction',
        'CancelAction',
        'ReserveAction',
        'ScheduleAction',
        'ApplyAction',
        'AllocateAction',
        'AuthorizeAction',
        'AssignAction',
        'RejectAction',
        'AcceptAction',
        'BookmarkAction',
      ];
    case 'AssessAction':
      return [
        'AssessAction',
        'IgnoreAction',
        'ChooseAction',
        'VoteAction',
        'ReactAction',
        'LikeAction',
        'DisagreeAction',
        'EndorseAction',
        'AgreeAction',
        'DislikeAction',
        'WantAction',
        'ReviewAction',
      ];
    case 'InteractAction':
      return [
        'InteractAction',
        'BefriendAction',
        'SubscribeAction',
        'LeaveAction',
        'UnRegisterAction',
        'MarryAction',
        'RegisterAction',
        'JoinAction',
        'CommunicateAction',
        'CheckOutAction',
        'InviteAction',
        'CommentAction',
        'ReplyAction',
        'ShareAction',
        'InformAction',
        'RsvpAction',
        'ConfirmAction',
        'AskAction',
        'CheckInAction',
        'FollowAction',
      ];
    case 'ConsumeAction':
      return [
        'ConsumeAction',
        'ViewAction',
        'DrinkAction',
        'ListenAction',
        'WatchAction',
        'InstallAction',
        'UseAction',
        'WearAction',
        'ReadAction',
        'EatAction',
      ];
    case 'CreateAction':
      return [
        'CreateAction',
        'DrawAction',
        'FilmAction',
        'CookAction',
        'PhotographAction',
        'PaintAction',
        'WriteAction',
      ];
    case 'PlayAction':
      return [
        'PlayAction',
        'ExerciseAction',
        'PerformAction',
      ];
    case 'SearchAction':
      return [
        'SearchAction',
      ];
    case 'FindAction':
      return [
        'FindAction',
        'CheckAction',
        'DiscoverAction',
        'TrackAction',
      ];
    case 'UpdateAction':
      return [
        'UpdateAction',
        'AddAction',
        'InsertAction',
        'AppendAction',
        'PrependAction',
        'DeleteAction',
        'ReplaceAction',
      ];
    default:
      return [
        'Action',
      ];
  }
}