...
  View open merge request
Commits (5)
......@@ -37,7 +37,8 @@
"t3o/t3omy": "@dev",
"t3o/t3o_slack": "@dev",
"t3o/t3o_ldap": "@dev",
"helhum/typo3-secure-web": "^0.2.8"
"helhum/typo3-secure-web": "^0.2.8",
"t3o/t3o-jobs": "@dev"
},
"config": {
"platform": {
......
<?php
namespace T3o\T3oJobs\Controller;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
/***
*
* This file is part of the "Typo3 Jobs" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019
*
***/
/**
* JobsController
*/
class JobsController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
/**
* jobsRepository
*
* @var \T3o\T3oJobs\Domain\Repository\JobsRepository
* @inject
*/
protected $jobsRepository = null;
/**
* skillsRepository
*
* @var \T3o\T3oJobs\Domain\Repository\SkillsRepository
* @inject
*/
protected $skillsRepository = null;
/**
* teamsRepository
*
* @var \T3o\T3oJobs\Domain\Repository\TeamsRepository
* @inject
*/
protected $teamsRepository = null;
/**
* jobsapplicantsRepository
*
* @var \T3o\T3oJobs\Domain\Repository\JobsapplicantsRepository
* @inject
*/
protected $jobsapplicantsRepository = null;
/**
* User Repository
*
* @var \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository
* @inject
*/
protected $userRepository;
/**
* action initialize
*/
public function initializeAction()
{
parent::initializeAction();
$data = $this->configurationManager->getContentObject();
$this->contentElementData = $data->data;
}
/**
* action list
*/
public function listAction()
{
if ($_REQUEST['tx_t3ojobs_jobs']['filterJob']) {
$filterJobdata = $this->request->getArgument('filterJob');
$this->view->assign('filterJob', $filterJobdata);
}
if ($filterJobdata['teams'] != 0 || $filterJobdata['jobskills'] != '' || $filterJobdata['search'] != '') {
$jobs = $this->jobsRepository->filterjob($filterJobdata);
} else {
$jobs = $this->jobsRepository->findAllJobs();
}
$jobskills = $this->skillsRepository->findAll();
$teams = $this->teamsRepository->findAll();
$assignArray = [
'jobs' => $jobs,
'jobskills' => $jobskills,
'teams' => $teams,
'data' => $this->contentElementData,
];
$this->view->assignMultiple($assignArray);
}
/**
* action show
*
* @param \T3o\T3oJobs\Domain\Model\Jobs $jobs
*/
public function showAction(\T3o\T3oJobs\Domain\Model\Jobs $jobs)
{
$this->view->assign('jobs', $jobs);
$feuserData = $this->userRepository->findByUid($GLOBALS['TSFE']->fe_user->user['uid']);
if ($feuserData) {
if ($feuserData->getName()) {
$name = $feuserData->getName();
} else {
$feusername = $feuserData->getUsername();
}
if ($feuserData->getEmail()) {
$feuseremail = $feuserData->getEmail();
}
$assignArray = [
'feusername' => $feusername,
'feuseremail' => $feuseremail,
];
$this->view->assignMultiple($assignArray);
}
$applynow = $_REQUEST['applynow'];
$this->view->assign('applynow', $applynow);
}
/**
* action createrequest
*/
public function createrequestAction()
{
$newRequest = new \T3o\T3oJobs\Domain\Model\Jobsapplicants;
if ($_REQUEST['tx_t3ojobs_jobs']['jobapplicants']) {
$data = $_REQUEST['tx_t3ojobs_jobs']['jobapplicants'];
$newRequest->setPid($data['jobpid']);
$newRequest->setJobid($data['jobid']);
$newRequest->setJobteam($data['jobteam']);
$newRequest->setJobtitle($data['jobtitle']);
$newRequest->setJobposition($data['jobposition']);
$newRequest->setName($data['jobname']);
$newRequest->setEmail($data['jobemail']);
$newRequest->setSlackId($data['jobslackId']);
$newRequest->setMessage($data['jobmessage']);
if ($data['jobteam']) {
$team = $this->teamsRepository->findByUid($data['jobteam']);
$mails = $team->getReceiversEmails();
$adminname = LocalizationUtility::translate('emailnameAdmin', 'T3oJobs');
$adminmailsubject = LocalizationUtility::translate('adminmailsubject', 'T3oJobs');
if ($mails != '') {
$emails = explode(',', $mails);
foreach ($emails as $mail) {
$res = $this->sendTemplateEmail([$mail => $adminname], [$data['jobemail'] => $data['jobname']], $adminmailsubject, 'adminMailTemplate', $data);
}
}
}
$this->jobsapplicantsRepository->add($newRequest);
}
}
/**
* @param array $recipient recipient of the email in the format array('recipient@domain.tld' => 'Recipient Name')
* @param array $sender sender of the email in the format array('sender@domain.tld' => 'Sender Name')
* @param string $subject subject of the email
* @param string $templateName template name (UpperCamelCase)
* @param array $variables variables to be passed to the Fluid view
*/
protected function sendTemplateEmail(array $recipient, array $sender, $subject, $templateName, array $variables = [])
{
/** @var \TYPO3\CMS\Fluid\View\StandaloneView $emailView */
$emailView = $this->objectManager->get('TYPO3\\CMS\\Fluid\\View\\StandaloneView');
/*For use of Localize value */
$extensionName = $this->request->getControllerExtensionName();
$emailView->getRequest()->setControllerExtensionName($extensionName);
/*For use of Localize value */
$extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
$templateRootPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($extbaseFrameworkConfiguration['view']['templateRootPaths']['0']);
$templatePathAndFilename = $templateRootPath . 'Email/' . $templateName . '.html';
$emailView->setTemplatePathAndFilename($templatePathAndFilename);
$emailView->assignMultiple($variables);
$emailBody = $emailView->render();
/** @var $message \TYPO3\CMS\Core\Mail\MailMessage */
$message = $this->objectManager->get('TYPO3\\CMS\\Core\\Mail\\MailMessage');
/*Mail to Admin*/
$message->setTo($recipient)->setFrom($sender)->setSubject($subject);
// HTML Email
$message->setBody($emailBody, 'text/html');
// $status = 0;
$message->send();
$status = $message->isSent();
return $status;
}
}
<?php
namespace T3o\T3oJobs\Domain\Model;
/***
*
* This file is part of the "Typo3 Jobs" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019
*
***/
/**
* Jobs
*/
class Jobs extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
* position
*
* @var string
* @validate NotEmpty
*/
protected $position = '';
/**
* title
*
* @var string
* @validate NotEmpty
*/
protected $title = '';
/**
* description
*
* @var string
*/
protected $description = '';
/**
* banner
*
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
* @cascade remove
*/
protected $banner = null;
/**
* noOfOpeningJobs
*
* @var int
*/
protected $noOfOpeningJobs = 0;
/**
* publishBy
*
* @var string
*/
protected $publishBy = '';
/**
* publishBySlackid
*
* @var string
*/
protected $publishBySlackid = '';
/**
* experiance
*
* @var string
*/
protected $experiance = '';
/**
* status
*
* @var string
*/
protected $status = '';
/**
* skills
*
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oJobs\Domain\Model\Skills>
*/
protected $skills = null;
/**
* teams
*
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oJobs\Domain\Model\Teams>
*/
protected $teams = null;
/**
* __construct
*/
public function __construct()
{
//Do not remove the next line: It would break the functionality
$this->initStorageObjects();
}
/**
* Initializes all ObjectStorage properties
* Do not modify this method!
* It will be rewritten on each save in the extension builder
* You may modify the constructor of this class instead
*/
protected function initStorageObjects()
{
$this->banner = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->skills = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->teams = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
}
/**
* Returns the title
*
* @return string $title
*/
public function getTitle()
{
return $this->title;
}
/**
* Sets the title
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* Returns the position
*
* @return string $position
*/
public function getPosition()
{
return $this->position;
}
/**
* Sets the position
*
* @param string $position
*/
public function setPosition($position)
{
$this->position = $position;
}
/**
* Returns the description
*
* @return string $description
*/
public function getDescription()
{
return $this->description;
}
/**
* Sets the description
*
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* Adds a FileReference
*
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $banner
*/
public function addBanner(\TYPO3\CMS\Extbase\Domain\Model\FileReference $banner)
{
$this->banner->attach($banner);
}
/**
* Removes a FileReference
*
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $bannerToRemove The FileReference to be removed
*/
public function removeBanner(\TYPO3\CMS\Extbase\Domain\Model\FileReference $bannerToRemove)
{
$this->banner->detach($bannerToRemove);
}
/**
* Returns the banner
*
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $banner
*/
public function getBanner()
{
return $this->banner;
}
/**
* Sets the banner
*
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $banner
*/
public function setBanner(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $banner)
{
$this->banner = $banner;
}
/**
* Returns the noOfOpeningJobs
*
* @return int $noOfOpeningJobs
*/
public function getNoOfOpeningJobs()
{
return $this->noOfOpeningJobs;
}
/**
* Sets the noOfOpeningJobs
*
* @param int $noOfOpeningJobs
*/
public function setNoOfOpeningJobs($noOfOpeningJobs)
{
$this->noOfOpeningJobs = $noOfOpeningJobs;
}
/**
* Returns the publishBy
*
* @return string $publishBy
*/
public function getPublishBy()
{
return $this->publishBy;
}
/**
* Sets the publishBy
*
* @param string $publishBy
*/
public function setPublishBy($publishBy)
{
$this->publishBy = $publishBy;
}
/**
* Returns the publishBySlackid
*
* @return string $publishBySlackid
*/
public function getPublishBySlackid()
{
return $this->publishBySlackid;
}
/**
* Sets the publishBySlackid
*
* @param string $publishBySlackid
*/
public function setPublishBySlackid($publishBySlackid)
{
$this->publishBySlackid = $publishBySlackid;
}
/**
* Returns the experiance
*
* @return string $experiance
*/
public function getExperiance()
{
return $this->experiance;
}
/**
* Sets the experiance
*
* @param string $experiance
*/
public function setExperiance($experiance)
{
$this->experiance = $experiance;
}
/**
* Returns the status
*
* @return string $status
*/
public function getStatus()
{
return $this->status;
}
/**
* Sets the status
*
* @param string $status
*/
public function setStatus($status)
{
$this->status = $status;
}
/**
* Adds a Skills
*
* @param \T3o\T3oJobs\Domain\Model\Skills $skill
*/
public function addSkill(\T3o\T3oJobs\Domain\Model\Skills $skill)
{
$this->skills->attach($skill);
}
/**
* Removes a skills
*
* @param \T3o\T3oJobs\Domain\Model\Skills $skillToRemove The Skills to be removed
*/
public function removeSkill(\T3o\T3oJobs\Domain\Model\Skills $skillToRemove)
{
$this->skills->detach($skillToRemove);
}
/**
* Returns the skills
*
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oJobs\Domain\Model\Skills> $skills
*/
public function getSkills()
{
return $this->skills;
}
/**
* Sets the skills
*
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oJobs\Domain\Model\Skills> $skills
*/
public function setSkills(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $skills)
{
$this->skills = $skills;
}
/**
* Adds a Teams
*
* @param \T3o\T3oJobs\Domain\Model\Teams $team
*/
public function addTeam(\T3o\T3oJobs\Domain\Model\Teams $team)
{
$this->teams->attach($team);
}
/**
* Removes a Teams
*
* @param \T3o\T3oJobs\Domain\Model\Teams $teamToRemove The Teams to be removed
*/
public function removeTeam(\T3o\T3oJobs\Domain\Model\Teams $teamToRemove)
{
$this->teams->detach($teamToRemove);
}
/**
* Returns the teams
*
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oJobs\Domain\Model\Teams> $teams
*/
public function getTeams()
{
return $this->teams;
}
/**
* Sets the teams
*
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oJobs\Domain\Model\Teams> $teams
*/
public function setTeams(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $teams)
{
$this->teams = $teams;
}
}
<?php
namespace T3o\T3oJobs\Domain\Model;
/***
*
* This file is part of the "Typo3 Jobs" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019
*
***/
/**
* Jobsapplicants
*/
class Jobsapplicants extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
* jobid
*
* @var string
*/
protected $jobid = '';
/**
* jobteam
*
* @var string
*/
protected $jobteam = '';
/**
* jobtitle
*
* @var string
*/
protected $jobtitle = '';
/**
* jobposition
*
* @var string
*/
protected $jobposition = '';
/**
* name
*
* @var string
*/
protected $name = '';
/**
* email
*
* @var string
*/
protected $email = '';
/**
* slackId
*
* @var string
*/
protected $slackId = '';
/**
* message
*
* @var string
*/
protected $message = '';
/**
* Returns the jobid
*
* @return string $jobid
*/
public function getJobid()
{
return $this->jobid;
}
/**
* Sets the jobid
*
* @param string $jobid
*/
public function setJobid($jobid)
{
$this->jobid = $jobid;
}
/**
* Returns the jobteam
*
* @return string $jobteam
*/
public function getJobteam()
{
return $this->jobteam;
}
/**
* Sets the jobteam
*
* @param string $jobteam
*/
public function setJobteam($jobteam)
{
$this->jobteam = $jobteam;
}
/**
* Returns the jobtitle
*
* @return string $jobtitle
*/
public function getJobtitle()
{
return $this->jobtitle;
}
/**
* Sets the jobtitle
*
* @param string $jobtitle
*/
public function setJobtitle($jobtitle)
{
$this->jobtitle = $jobtitle;
}
/**
* Returns the jobposition
*
* @return string $jobposition
*/
public function getJobposition()
{
return $this->jobposition;
}
/**
* Sets the jobposition
*
* @param string $jobposition
*/
public function setJobposition($jobposition)
{
$this->jobposition = $jobposition;
}
/**
* Returns the name
*
* @return string $name
*/
public function getName()
{
return $this->name;
}
/**
* Sets the name
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* Returns the email
*
* @return string $email
*/
public function getEmail()
{
return $this->email;
}
/**
* Sets the email
*
* @param string $email
*/
public function setEmail($email)
{
$this->email = $email;
}
/**
* Returns the slackId
*
* @return string $slackId
*/
public function getSlackId()
{
return $this->slackId;
}
/**
* Sets the slackId
*
* @param string $slackId
*/
public function setSlackId($slackId)
{
$this->slackId = $slackId;
}
/**
* Returns the message
*
* @return string $message
*/
public function getMessage()
{
return $this->message;
}
/**
* Sets the message
*
* @param string $message
*/
public function setMessage($message)
{
$this->message = $message;
}
}
<?php
namespace T3o\T3oJobs\Domain\Model;
/***
*
* This file is part of the "Typo3 Jobs" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019
*
***/
/**
* Skills
*/
class Skills extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
* title
*
* @var string
*/
protected $title = '';
/**
* Returns the title
*
* @return string $title
*/
public function getTitle()
{
return $this->title;
}
/**
* Sets the title
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
}
<?php
namespace T3o\T3oJobs\Domain\Model;
/***
*
* This file is part of the "Typo3 Jobs" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019
*
***/
/**
* Teams
*/
class Teams extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
* title
*
* @var string
*/
protected $title = '';
/**
* receiversEmails
*
* @var string
*/
protected $receiversEmails = '';
/**
* __construct
*/
public function __construct()
{
//Do not remove the next line: It would break the functionality
$this->initStorageObjects();
}
/**
* Initializes all ObjectStorage properties
* Do not modify this method!
* It will be rewritten on each save in the extension builder
* You may modify the constructor of this class instead
*/
protected function initStorageObjects()
{
$this->banner = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
}
/**
* Returns the title
*
* @return string $title
*/
public function getTitle()
{
return $this->title;
}
/**
* Sets the title
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* Returns the receiversEmails
*
* @return string $receiversEmails
*/
public function getReceiversEmails()
{
return $this->receiversEmails;
}
/**
* Sets the receiversEmails
*
* @param string $receiversEmails
*/
public function setReceiversEmails($receiversEmails)
{
$this->receiversEmails = $receiversEmails;
}
}
<?php
namespace T3o\T3oJobs\Domain\Repository;
/***
*
* This file is part of the "Typo3 Jobs" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019
*
***/
/**
* The repository for Jobs
*/
class JobsRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
public function filterjob($filterJobdata = null)
{
$query = $this->createQuery();
$constraints = [];
// Compare teams
if ($filterJobdata['teams'] != 0) {
$constraints[] = $query->contains('teams', $filterJobdata['teams']);
}
// Compare jobskills
if ($filterJobdata['jobskills'] != '') {
foreach ($filterJobdata['jobskills'] as $key => $value) {
$constJobsskills[] = $query->contains('skills', $value);
}
$constraints[] = $query->logicalOr($constJobsskills);
}
// Search from title, description
if ($filterJobdata['search'] != '') {
$constJobsearch[0] = $query->like('title', '%' . $filterJobdata['search'] . '%');
$constJobsearch[1] = $query->like('description', '%' . $filterJobdata['search'] . '%');
$constraints[] = $query->logicalOr($constJobsearch);
}
$constraints[] = $query->equals('status', 0);
// Execute query
$query->matching(
$query->logicalAnd($constraints)
);
return $result = $query->execute();
}
public function findAllJobs()
{
$query = $this->createQuery();
$query->matching(
$query->equals('status', 0)
);
return $query->execute();
}
/**
* @var array
*/
protected $defaultOrderings = [
'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING,
];
}
<?php
namespace T3o\T3oJobs\Domain\Repository;
/***
*
* This file is part of the "Typo3 Jobs" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019
*
***/
/**
* The repository for T3jobs
*/
class JobsapplicantsRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
/**
* @var array
*/
protected $defaultOrderings = [
'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING,
];
}
<?php
namespace T3o\T3oJobs\Domain\Repository;
/***
*
* This file is part of the "Typo3 Jobs" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019
*
***/
/**
* The repository for Skills
*/
class SkillsRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
/**
* @var array
*/
protected $defaultOrderings = [
'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING,
];
}
<?php
namespace T3o\T3oJobs\Domain\Repository;
/***
*
* This file is part of the "Typo3 Jobs" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019
*
***/
/**
* The repository for Teams
*/
class TeamsRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
/**
* @var array
*/
protected $defaultOrderings = [
'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING,
];
}
<?php
namespace T3o\T3oJobs\Hooks;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Service\FlexFormService;
use TYPO3\CMS\Fluid\View\StandaloneView;
class PageLayoutView implements \TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface
{
public function preProcess(\TYPO3\CMS\Backend\View\PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row)
{
$extKey = 't3o_jobs';
if ($row['CType'] == 'list' && $row['list_type'] == 't3ojobs_jobs') {
$drawItem = false;
$headerContent = '';
// template
$view = $this->getFluidTemplate($extKey, 'Jobs');
if (!empty($row['pi_flexform'])) {
/** @var FlexFormService $flexFormService */
$flexFormService = GeneralUtility::makeInstance(FlexFormService::class);
}
// assign all to view
$view->assignMultiple([
'data' => $row,
'flexformData' => $flexFormService->convertFlexFormContentToArray($row['pi_flexform']),
]);
// return the preview
$itemContent = $parentObject->linkEditContent($view->render(), $row);
}
}
/**
* @param string $extKey
* @param string $templateName
* @return string the fluid template
*/
protected function getFluidTemplate($extKey, $templateName)
{
// prepare own template
$fluidTemplateFile = GeneralUtility::getFileAbsFileName('EXT:' . $extKey . '/Resources/Private/Backend/' . $templateName . '.html');
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->setTemplatePathAndFilename($fluidTemplateFile);
return $view;
}
}
<T3DataStructure>
<meta>
<langDisable>1</langDisable>
</meta>
<ROOT>
<type>array</type>
<el>
<switchableControllerActions>
<TCEforms>
<label>LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:t3o_jobs_flexform.view</label>
<config>
<type>select</type>
<onChange>reload</onChange>
<renderType>selectSingle</renderType>
<items>
<numIndex index="1">
<numIndex index="0">LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:t3o_jobs_flexform.view_list</numIndex>
<numIndex index="1">Jobs->list</numIndex>
</numIndex>
<numIndex index="2">
<numIndex index="0">LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:t3o_jobs_flexform.view_detail</numIndex>
<numIndex index="1">Jobs->show;Jobs->createrequest</numIndex>
</numIndex>
</items>
</config>
</TCEforms>
</switchableControllerActions>
<settings.detailpage>
<TCEforms>
<label>LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:t3o_jobs_flexform.detailpage</label>
<displayCond>FIELD:switchableControllerActions:!=:Jobs->show;Jobs->createrequest</displayCond>
<config>
<type>input</type>
<renderType>inputLink</renderType>
<size>30</size>
<eval>trim,required</eval>
<fieldControl>
<linkPopup>
<options>
<blindLinkOptions>file,mail,spec,folder</blindLinkOptions>
<!--<blindLinkFields>class,params,target,title</blindLinkFields>-->
</options>
</linkPopup>
</fieldControl>
</config>
</TCEforms>
</settings.detailpage>
<settings.listpage>
<TCEforms>
<label>LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:t3o_jobs_flexform.listpage</label>
<displayCond>FIELD:switchableControllerActions:=:Jobs->show;Jobs->createrequest</displayCond>
<config>
<type>input</type>
<renderType>inputLink</renderType>
<size>30</size>
<eval>trim,required</eval>
<fieldControl>
<linkPopup>
<options>
<blindLinkOptions>file,mail,spec,folder</blindLinkOptions>
<!--<blindLinkFields>class,params,target,title</blindLinkFields>-->
</options>
</linkPopup>
</fieldControl>
</config>
</TCEforms>
</settings.listpage>
</el>
</ROOT>
</T3DataStructure>
\ No newline at end of file
<?php
defined('TYPO3_MODE') || die('Access denied.');
$extKey = 't3o_jobs';
// Adding fields to the tt_content table definition in TCA
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($extKey, 'Configuration/TypoScript', 'Typo3 Jobs');
<?php
defined('TYPO3_MODE') or die();
$_EXTKEY = 't3o_jobs';
/***************
* Plugin
*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'T3o.T3oJobs',
'Jobs',
'Jobs '
);
/* Flexform setting */
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_' . 'jobs';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'recursive,select_key';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForm/FlexFormJobs.xml');
<?php
return [
'ctrl' => [
'title' => 'LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:tx_t3ojobs_domain_model_jobsapplicants',
'label' => 'name',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'default_sortby' => 'ORDER BY uid DESC',
'versioningWS' => true,
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'delete' => 'deleted',
'enablecolumns' => [
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'searchFields' => 'name,email,slack_id,message,feuser_id',
'iconfile' => 'EXT:t3o_jobs/Resources/Public/Icons/tx_t3ojobs_domain_model_jobsapplicants.png',
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, email, slack_id, message, feuser_id',
],
'types' => [
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, jobtitle, --palette--;;paletteApplicantsJobData, --palette--;;paletteApplicantsids, name, email, message, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, hidden, starttime, endtime'],
],
'palettes' => [
'paletteApplicantsJobData' => [
'showitem' => 'jobposition',
],
'paletteApplicantsids' => [
'showitem' => 'jobid, slack_id',
],
],
'columns' => [
'sys_language_uid' => [
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'special' => 'languages',
'items' => [
[
'LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages',
-1,
'flags-multiple',
],
],
'default' => 0,
],
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'default' => 0,
'items' => [
['', 0],
],
'foreign_table' => 'tx_t3ojobs_domain_model_jobsapplicants',
'foreign_table_where' => 'AND tx_t3ojobs_domain_model_jobsapplicants.pid=###CURRENT_PID### AND tx_t3ojobs_domain_model_jobsapplicants.sys_language_uid IN (-1,0)',
],
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
],
],
't3ver_label' => [
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
'config' => [
'type' => 'input',
'size' => 30,
'max' => 255,
],
],
'hidden' => [
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
'items' => [
'1' => [
'0' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.enabled',
],
],
],
],
'starttime' => [
'exclude' => true,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 13,
'eval' => 'datetime',
'default' => 0,
],
],
'endtime' => [
'exclude' => true,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 13,
'eval' => 'datetime',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038),
],
],
],
'jobid' => [
'exclude' => true,
'label' => 'LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:tx_t3ojobs_domain_model_jobsapplicants.jobuid',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim,int',
],
],
'jobtitle' => [
'exclude' => true,
'label' => 'LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:tx_t3ojobs_domain_model_jobsapplicants.jobtitle',
'config' => [
'type' => 'input',
'size' => 40,
'eval' => 'trim',
],
],
'jobposition' => [
'exclude' => true,
'label' => 'LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:tx_t3ojobs_domain_model_jobsapplicants.jobposition',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim',
],
],
'jobteam' => [
'exclude' => true,
'label' => 'LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:tx_t3ojobs_domain_model_jobsapplicants.jobteam',
'config' => [
'type' => 'input',
'size' => 40,
'eval' => 'trim',
],
],
'name' => [
'exclude' => true,
'label' => 'LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:tx_t3ojobs_domain_model_jobsapplicants.name',
'config' => [
'type' => 'input',
'size' => 40,
'eval' => 'trim',
],
],
'email' => [
'exclude' => true,
'label' => 'LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:tx_t3ojobs_domain_model_jobsapplicants.email',
'config' => [
'type' => 'input',
'size' => 40,
'eval' => 'nospace,email',
],
],
'slack_id' => [
'exclude' => true,
'label' => 'LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:tx_t3ojobs_domain_model_jobsapplicants.slack_id',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim',
],
],
'message' => [
'exclude' => true,
'label' => 'LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:tx_t3ojobs_domain_model_jobsapplicants.message',
'config' => [
'type' => 'text',
'cols' => 40,
'rows' => 5,
'eval' => 'trim',
],
],
],
];
<?php
return [
'ctrl' => [
'title' => 'LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:tx_t3ojobs_domain_model_skills',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'sortby' => 'sorting',
'versioningWS' => true,
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'delete' => 'deleted',
'enablecolumns' => [
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'searchFields' => 'title',
'iconfile' => 'EXT:t3o_jobs/Resources/Public/Icons/tx_t3ojobs_domain_model_skills.png',
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title',
],
'types' => [
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, title, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, hidden, starttime, endtime'],
],
'columns' => [
'sys_language_uid' => [
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'special' => 'languages',
'items' => [
[
'LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages',
-1,
'flags-multiple',
],
],
'default' => 0,
],
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'default' => 0,
'items' => [
['', 0],
],
'foreign_table' => 'tx_t3ojobs_domain_model_skills',
'foreign_table_where' => 'AND tx_t3ojobs_domain_model_skills.pid=###CURRENT_PID### AND tx_t3ojobs_domain_model_skills.sys_language_uid IN (-1,0)',
],
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
],
],
't3ver_label' => [
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
'config' => [
'type' => 'input',
'size' => 30,
'max' => 255,
],
],
'hidden' => [
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
'items' => [
'1' => [
'0' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.enabled',
],
],
],
],
'starttime' => [
'exclude' => true,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 13,
'eval' => 'datetime',
'default' => 0,
],
],
'endtime' => [
'exclude' => true,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 13,
'eval' => 'datetime',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038),
],
],
],
'title' => [
'exclude' => true,
'label' => 'LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:tx_t3ojobs_domain_model_skills.title',
'config' => [
'type' => 'input',
'size' => 40,
'eval' => 'trim,required',
],
],
],
];
<?php
return [
'ctrl' => [
'title' => 'LLL:EXT:t3o_jobs/Resources/Private/Language/locallang_db.xlf:tx_t3ojobs_domain_model_teams',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'sortby' => 'sorting',
'versioningWS' => true,
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',