There was a discussion a few years ago about that current access level implementation for plugins should be removed. Instead each plugin should handle authorization inside its code. As most important things in Joomla do, this discussion went nowhere. But you can implement access checks in your plugin anyways. This would be at a small performance cost since ...
The good news is that this is a very basic task.
I would pass the entire players result set to your view via $this->_item->players.
$db->qn('teamid') . ' = ' . $db->q($value),
"active = 1"
The below code is mostly from Joomla's /includes/app.php but without the last line.
The last few lines then get information about the user and the user session.
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';
// Boot the DI container
To use J4 style or custom naming conventions with AJAX you have to convert the module to new service-based format. At a minimum, service provider (services/provider.php) needs to provide a module extension, a dispatcher factory and a helper factory:
defined('_JEXEC') or exit;
I had two extra minutes to test this according to my previous comments under your question.
I created a helper.php inside the ArticlesLatest Module (root of that module) and created a class: class ModArticlesLatestHelper
This looks simply:
* @package Joomla.Site
* @subpackage mod_articles_latest
* @copyright (C) 2006 Open Source ...
Since you are talking about a module, and your code and comments indicate that you are trying to get a specific article by its ID, your module helper should look like:
\defined('_JEXEC') or die;
abstract class ...
I'm not sure if you discovered an answer yourself but this is what I do in J4 to get custom fields:
Then you can cycle through the returned fields in your foreach. Hope this helps.
Article data is not available in that layout. What you can do is create an override of components/com_fields/layouts/fields/render.php and modify it to pass the article to field/render.php layout. You'd have to change this line:
$content = FieldsHelper::render($context, 'field.' . $layout, array('field' => $field));
$content = FieldsHelper::...