![]() 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/Magefan/Blog/Model/ResourceModel/ |
<?php /** * Copyright © Magefan ([email protected]). All rights reserved. * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement). * * Glory to Ukraine! Glory to the heroes! */ namespace Magefan\Blog\Model\ResourceModel; use Magento\Framework\Model\ResourceModel\Db\AbstractDb; use Magefan\Blog\Api\AuthorResourceModelInterface; /** * Blog author resource model */ class Author extends AbstractDb implements AuthorResourceModelInterface { /** * Initialize resource model * Get tablename from config * * @return void */ protected function _construct() { $this->_init('admin_user', 'user_id'); } /** * Load an object using 'identifier' field if there's no field specified and value is not numeric * * @param \Magento\Framework\Model\AbstractModel $object * @param mixed $value * @param string $field * @return $this */ public function load(\Magento\Framework\Model\AbstractModel $object, $value, $field = null) { if (!is_numeric($value) && is_null($field)) { $value = $object->checkIdentifier($value); } return parent::load($object, $value, $field); } }