diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-03-29 15:59:42 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-03-29 20:49:35 +0100 |
| commit | e2a378d30d9bd3fff591da7a11c7cb5ead502323 (patch) | |
| tree | 3c4469c2e08eb9059efd61c40a931ada3dbc0e2c /app/Module/YahrzeitModule.php | |
| parent | 06fa22107d3ca09d8b7a2c724decbc30c44d4548 (diff) | |
| download | webtrees-e2a378d30d9bd3fff591da7a11c7cb5ead502323.tar.gz webtrees-e2a378d30d9bd3fff591da7a11c7cb5ead502323.tar.bz2 webtrees-e2a378d30d9bd3fff591da7a11c7cb5ead502323.zip | |
Split class Module into static and abstract parts
Diffstat (limited to 'app/Module/YahrzeitModule.php')
| -rw-r--r-- | app/Module/YahrzeitModule.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/app/Module/YahrzeitModule.php b/app/Module/YahrzeitModule.php index 415d7edd9a..00a4820daf 100644 --- a/app/Module/YahrzeitModule.php +++ b/app/Module/YahrzeitModule.php @@ -22,7 +22,7 @@ use Rhumsaa\Uuid\Uuid; /** * Class YahrzeitModule */ -class YahrzeitModule extends Module implements ModuleBlockInterface { +class YahrzeitModule extends AbstractModule implements ModuleBlockInterface { /** {@inheritdoc} */ public function getTitle() { return /* I18N: Name of a module. Yahrzeiten (the plural of Yahrzeit) are special anniversaries of deaths in the Hebrew faith/calendar. */ I18N::translate('Yahrzeiten'); @@ -37,10 +37,10 @@ class YahrzeitModule extends Module implements ModuleBlockInterface { public function getBlock($block_id, $template = true, $cfg = null) { global $ctype, $controller, $WT_TREE; - $days = get_block_setting($block_id, 'days', '7'); - $infoStyle = get_block_setting($block_id, 'infoStyle', 'table'); - $calendar = get_block_setting($block_id, 'calendar', 'jewish'); - $block = get_block_setting($block_id, 'block', '1'); + $days = $this->getBlockSetting($block_id, 'days', '7'); + $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', 'table'); + $calendar = $this->getBlockSetting($block_id, 'calendar', 'jewish'); + $block = $this->getBlockSetting($block_id, 'block', '1'); if ($cfg) { foreach (array('days', 'infoStyle', 'block') as $name) { @@ -232,16 +232,16 @@ class YahrzeitModule extends Module implements ModuleBlockInterface { /** {@inheritdoc} */ public function configureBlock($block_id) { if (Filter::postBool('save') && Filter::checkCsrf()) { - set_block_setting($block_id, 'days', Filter::postInteger('days', 1, 30, 7)); - set_block_setting($block_id, 'infoStyle', Filter::post('infoStyle', 'list|table', 'table')); - set_block_setting($block_id, 'calendar', Filter::post('calendar', 'jewish|gregorian', 'jewish')); - set_block_setting($block_id, 'block', Filter::postBool('block')); + $this->setBlockSetting($block_id, 'days', Filter::postInteger('days', 1, 30, 7)); + $this->setBlockSetting($block_id, 'infoStyle', Filter::post('infoStyle', 'list|table', 'table')); + $this->setBlockSetting($block_id, 'calendar', Filter::post('calendar', 'jewish|gregorian', 'jewish')); + $this->setBlockSetting($block_id, 'block', Filter::postBool('block')); } - $days = get_block_setting($block_id, 'days', '7'); - $infoStyle = get_block_setting($block_id, 'infoStyle', 'table'); - $calendar = get_block_setting($block_id, 'calendar', 'jewish'); - $block = get_block_setting($block_id, 'block', '1'); + $days = $this->getBlockSetting($block_id, 'days', '7'); + $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', 'table'); + $calendar = $this->getBlockSetting($block_id, 'calendar', 'jewish'); + $block = $this->getBlockSetting($block_id, 'block', '1'); echo '<tr><td class="descriptionbox wrap width33">'; echo I18N::translate('Number of days to show'); |
