diff --git a/src/Models/BaseElement.php b/src/Models/BaseElement.php index daf287e8..2c70c4eb 100644 --- a/src/Models/BaseElement.php +++ b/src/Models/BaseElement.php @@ -1231,22 +1231,28 @@ public function getPageTitle() return null; } - /** - * @return boolean - */ - public function First() + public function IsFirst(): bool { return ($this->Parent()->Elements()->first()->ID === $this->ID); } - /** - * @return boolean - */ - public function Last() + public function First() + { + Deprecation::notice('5.4.0', 'Use IsFirst instead'); + return $this->IsFirst(); + } + + public function IsLast(): bool { return ($this->Parent()->Elements()->last()->ID === $this->ID); } + public function Last() + { + Deprecation::notice('5.4.0', 'Use IsLast instead'); + return $this->IsLast(); + } + /** * @return int */