![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/app/code/Amasty/Base/Model/Source/Category/ |
<?php declare(strict_types=1); /** * @author Amasty Team * @copyright Copyright (c) Amasty (https://www.amasty.com) * @package Magento 2 Base Package */ namespace Amasty\Base\Model\Source\Category; use Magento\Framework\DataObject; /** * Lightweight data model class for items of \Magento\Catalog\Model\ResourceModel\Category\Collection * * @since 1.15.2 */ class DataModel extends DataObject { public function getId(): int { return (int)$this->getDataByKey('entity_id'); } public function getLevel(): int { return (int)$this->getDataByKey('level'); } public function getName(): string { return (string)$this->getDataByKey('name'); } public function getPosition(): int { return (int)$this->getDataByKey('position'); } public function getParentId(): int { return (int)$this->getDataByKey('parent_id'); } public function getChildrenCount(): int { return (int)$this->getDataByKey('children_count'); } }