1. Go to this page and download the library: Download xima/xima-typo3-recordlist library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
xima / xima-typo3-recordlist example snippets
// EXT:my_extension/Classes/Controller/UserController.php
namespace Vendor\MyExtension\Controller\Backend;
use Xima\XimaTypo3Recordlist\Controller\AbstractBackendController;
class UserController extends AbstractBackendController
{
public function getTableName(): string
{
return 'fe_users';
}
public function getRecordPid(): int
{
return $this->site->getConfiguration()['userPid'] ?? 0;
}
}
class UserController extends AbstractBackendController
{
public function modifyRecord(array &$record): void
{
$record['fullName'] = $record['first_name'] . ' ' . $record['last_name'];
}
}
class UserController extends AbstractBackendController
{
public function modifyQueryBuilder(): void
{
if (isset($body['register_date']) && $body['register_date']) {
$registerDate = new DateTime($body['register_date']);
$this->additionalConstraints[] = $this->queryBuilder->expr()->gte('register_date', $registerDate->getTimestamp());
}
}
}
class NewsController extends AbstractBackendController
{
public function modifyTableConfiguration(): void
{
$this->tableConfiguration['columns']['fal_media']['defaultPosition'] = 2;
$this->tableConfiguration['columns']['author']['defaultPosition'] = 3;
$this->tableConfiguration['columns']['sitemap_changefreq']['defaultPosition'] = 4;
$this->tableConfiguration['columns']['sys_language_uid']['defaultPosition'] = 5;
$this->tableConfiguration['columns']['workspace-status']['defaultPosition'] = 6;
}
}
class UserController extends AbstractBackendController
{
public function modifyTableConfiguration(): void
{
// make title field inline editiable
$this->tableConfiguration['columns']['title']['partial'] = 'TextInlineEdit';
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.