This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// config.php | |
<?php | |
$GLOBALS['TL_HOOKS']['avisotaSubscribe'][] = array('CustomAvisotaNotification', 'hookAvisotaSubscribe'); | |
$GLOBALS['TL_HOOKS']['avisotaActivateSubscribtion'][] = array('CustomAvisotaNotification', 'hookAvisotaActivateSubscribtion'); | |
$GLOBALS['TL_HOOKS']['avisotaUnsubscribe'][] = array('CustomAvisotaNotification', 'hookAvisotaUnsubscribe'); | |
?> | |
// CustomAvisotaNotification.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Media | |
{ | |
Media static get(String file); | |
bool isImage(); | |
bool isPDF(); | |
bool isVideo(); | |
bool isAudio(); | |
bool hasThumb(); | |
Media getThumb(Size size); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ ! -f $HOME/workspace/composer.phar ]]; then | |
mkdir -p $HOME/workspace | |
curl -s https://getcomposer.org/installer | php -- --install-dir=$HOME/workspace | |
fi | |
php $HOME/workspace/composer.phar "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// system/modules/avisota-extend/config/database.sql | |
CREATE TABLE `tl_avisota_recipient` ( | |
`myfield` varchar(255) NOT NULL default '', | |
) ENGINE=MyISAM DEFAULT CHARSET=utf8; | |
// system/modules/avisota-extend/dca/tl_avisota_recipient.php | |
<?php | |
$GLOBALS['TL_DCA']['tl_avisota_recipient']['palettes']['default'] .= ';{zusatzfelder_legend},myfield'; | |
$GLOBALS['TL_DCA']['tl_avisota_recipient']['fields']['myfield'] = array( | |
'label' => &$GLOBALS['TL_LANG']['tl_avisota_recipient']['myfield'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $container; | |
// access the avisota subscription manager | |
/** @var \Avisota\Contao\SubscriptionManager $subscriptionManager */ | |
$subscriptionManager = $container['avisota.subscription']; | |
// subscribe global | |
$subscriptionManager->subscribe('[email protected]'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// access the entity manager and get the recipient repository | |
/** @var \Contao\Doctrine\ORM\EntityHelper $entityManager */ | |
$entityManager = EntityHelper::getEntityManager(); | |
$repository = $entityManager->getRepository('Avisota\Contao:Recipient'); | |
// search recipient by email | |
/** @var \Avisota\Contao\Entity\Recipient $recipient */ | |
$recipient = $repository->findOneBy(array('email' => '[email protected]')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$GLOBALS['TL_EVENTS']['avisota-recipient-subscribe'][] = function( | |
\Avisota\Contao\Event\SubscribeEvent $event | |
) { | |
/** @var \Avisota\Contao\Entity\Recipient $recipient */ | |
$recipient = $event->getRecipient(); | |
/** @var \Avisota\Contao\Entity\RecipientSubscription $subscription */ | |
$subscription = $event->getSubscription(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert a Date object to a string, according to W3C date time format: yyyy-mm-ddThh:ii:ss+zz:zz | |
* | |
* @memberOf Date | |
* @access public | |
* @license MIT | |
* @copyright 2013 Tristan Lins | |
* @author Tristan Lins <[email protected]> | |
* @link https://gist.github.com/tristanlins/6585391 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class APrototypedClass extends Prototype | |
{ | |
} | |
APrototypedClass::$prototype['getId'] = function() { | |
return $this->id; | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"repositories": [ | |
{ | |
"type": "package", | |
"package": { | |
"name": "components/jquery-transit", | |
"type": "component", | |
"version": "0.9.9", | |
"homepage": "https://github.com/rstacruz/jquery.transit", | |
"require": { |
OlderNewer