My code
use Joomla\CMS\Language\Text;
use Joomla\CMS\Access\Access;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
\defined('_JEXEC') or die;
$app = Factory::getApplication('Site');
// Get an instance of the generic articles model
$model = $app->bootComponent('com_content')->getMVCFactory()->createModel('Articles', 'Site', ['ignore_request' => true]);
$appParams = $app->getParams();
$model->setState('params', $appParams);
$model->setState('filter.published', ContentComponent::CONDITION_PUBLISHED);
$items = $model->getItems();
The first error in the line
$appParams = $app->getParams();
Call to undefined method Joomla\CMS\Application\AdministratorApplication::getParams()
The second error in the line
$items = $model->getItems();
Call to a member function get() on null
1 () JROOT\components\com_content\src\Model\ArticlesModel.php:273
2 Joomla\Component\Content\Site\Model\ArticlesModel->getListQuery() JROOT\libraries\src\MVC\Model\ListModel.php:215
3 Joomla\CMS\MVC\Model\ListModel->_getListQuery() JROOT\libraries\src\MVC\Model\ListModel.php:264
4 Joomla\CMS\MVC\Model\ListModel->getItems() JROOT\components\com_content\src\Model\ArticlesModel.php:640
5 Joomla\Component\Content\Site\Model\ArticlesModel->getItems() JROOT\administrator\modules\mod_antajaxrequest\articlelist.php:21
Tell me how to get a list of site articles in the administrative panel, in the module parameters? Thank you.