function OrderOperation::pack
Converts the operation to a structure that can be stored in the container.
Return value
array Packed operation.
File
-
core/
lib/ Drupal/ Core/ Hook/ OrderOperation/ OrderOperation.php, line 32
Class
- OrderOperation
- Base class for order operations.
Namespace
Drupal\Core\Hook\OrderOperationCode
public final function pack() : array {
$is_before_or_after = match (get_class($this)) { BeforeOrAfter::class => TRUE,
FirstOrLast::class => FALSE,
};
return [
$is_before_or_after,
get_object_vars($this),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.