Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bytehead committed Dec 29, 2021
1 parent 8dd0d75 commit acfb8cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function onOptionsCallback(DataContainer $dc): array
$statement = $this->connection->executeQuery(
"SELECT m.id, m.name
FROM tl_module m
WHERE m.type <> 'root_page_dependent_module' AND
WHERE m.type <> 'root_page_dependent_module' AND
m.pid = ?
ORDER BY m.name",
[$dc->activeRecord->pid]
Expand All @@ -118,7 +118,7 @@ public function onOptionsCallback(DataContainer $dc): array
"SELECT m.id, m.name
FROM tl_module m
WHERE m.type IN (?) AND
m.type <> 'root_page_dependent_module' AND
m.type <> 'root_page_dependent_module' AND
m.pid = ?
ORDER BY m.name",
[$types, $dc->activeRecord->pid],
Expand All @@ -135,7 +135,10 @@ public function onOptionsCallback(DataContainer $dc): array
return $options;
}

public function onSaveCallback($value, DataContainer $dataContainer)
/**
* @param mixed $value
*/
public function onSaveCallback($value, DataContainer $dataContainer): string
{
$values = StringUtil::deserialize($value);

Expand Down
6 changes: 3 additions & 3 deletions core-bundle/src/Resources/contao/dca/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -641,14 +641,14 @@
(
'exclude' => true,
'inputType' => 'rootPageDependentModule',
'options_callback' => array(RootPageDependentModuleListener::class, 'onOptionsCallback'),
'options_callback' => array('contao.listener.data_container.root_page_dependent_module', 'onOptionsCallback'),
'save_callback' => array
(
array(RootPageDependentModuleListener::class, 'onSaveCallback')
array('contao.listener.data_container.root_page_dependent_module', 'onSaveCallback')
),
'wizard' => array
(
array(RootPageDependentModuleListener::class, 'onEditModule')
array('contao.listener.data_container.root_page_dependent_module', 'onEditModule')
),
'eval' => array('submitOnChange'=>true, 'tl_class'=>'w50', 'includeBlankOption'=>true),
'sql' => 'blob NULL'
Expand Down

0 comments on commit acfb8cf

Please sign in to comment.