Skip to content
This repository has been archived by the owner on Jun 26, 2018. It is now read-only.

Commit

Permalink
#2 add title translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Georg Duemmler committed May 15, 2016
1 parent 655e5ec commit c162735
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Classes/Utility/Tca/AbstractTca.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AbstractTca
*/
public function getSearchFields()
{
return implode(',', $this->conf->getSearchFields());
return implode(',', $this->conf->ctrl->getSearchFields());
}

/**
Expand Down
17 changes: 11 additions & 6 deletions Classes/Utility/Tca/Tca.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ class Tca extends AbstractTca
* @param Configuration $configuration
*/
public function init(Configuration $configuration)
{
$this->setDefaults($configuration);
}

/**
* @param Configuration $configuration
*/
private function setDefaults(Configuration $configuration)
{
$this->conf = $configuration;
$this->conf->interface->setShowRecordFieldList($this->getRecordsFieldList());




$ll = $this->conf->getLl();
$iconFile = $this->conf->ctrl->getIconFile();
$enableColumns = $this->conf->ctrl->getEnableColumns();
Expand All @@ -28,11 +33,11 @@ public function init(Configuration $configuration)
}

if (empty($iconFile)) {
$this->iconFile = ExtensionManagementUtility::extRelPath($this->conf->getExt()) . 'Resources/Public/Icons/' . $this->conf->getModel() . '.gif';
$this->conf->ctrl->setIconFile(ExtensionManagementUtility::extRelPath($this->conf->getExt()) . 'Resources/Public/Icons/' . $this->conf->getModel() . '.gif');
}

if (count($enableColumns) == 0) {
$this->conf->setEnableColumns(array(
$this->conf->ctrl->setEnableColumns(array(
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
Expand All @@ -50,7 +55,7 @@ public function createTca()

$tca = array(
'ctrl' => array(
'title' => $this->conf->ctrl->getTitle(),
'title' => $this->getFieldLabel($this->conf->ctrl->getTitle()),
'label' => $this->conf->ctrl->getLabel(),
'label_alt' => $this->conf->ctrl->getLabelAlt(),
'label_alt_force' => $this->conf->ctrl->isLabelAltForce(),
Expand Down

0 comments on commit c162735

Please sign in to comment.