PHP code example of cliffparnitzky / birthday-lister
1. Go to this page and download the library: Download cliffparnitzky/birthday-lister 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/ */
cliffparnitzky / birthday-lister example snippets
// config.php
$GLOBALS['TL_HOOKS']['birthdayListerModifyBirthdayChildren'][] = array('MyClass', 'myModification');
// MyClass.php
class MyClass
{
public function myModification($arrBirthdayChildren, $modulConfig)
{
if ($modulConfig->birthdayListPeriod == 'mySpecialPeriod')
{
// do custom modification here
}
return $arrBirthdayChildren;
}
}
// config.php
$GLOBALS['TL_HOOKS']['birthdayListerCheckBirthdayInPeriod'][] = array('MyClass', 'myPeriodCheck');
// MyClass.php
class MyClass
{
public function myPeriodCheck($birthdayInPeriod, $modulConfig, $birthday, $birthdayChild)
{
if ($modulConfig->birthdayListPeriod == 'mySpecialPeriod')
{
// do custom checking here
}
return $birthdayInPeriod;
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.