mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-02 20:25:28 +00:00
Some more work done. Mainly accounts. [skip ci]
This commit is contained in:
37
app/lib/Firefly/Helper/Form/FormTrigger.php
Normal file
37
app/lib/Firefly/Helper/Form/FormTrigger.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: sander
|
||||
* Date: 25/07/14
|
||||
* Time: 21:04
|
||||
*/
|
||||
|
||||
namespace Firefly\Helper\Form;
|
||||
|
||||
use Illuminate\Events\Dispatcher;
|
||||
/**
|
||||
* Class FormTrigger
|
||||
*
|
||||
* @package Firefly\Helper\Form
|
||||
*/
|
||||
class FormTrigger {
|
||||
|
||||
public function registerFormExtensions() {
|
||||
\Form::macro(
|
||||
'budget', function () {
|
||||
$helper = new \Firefly\Helper\Form\FormHelper;
|
||||
return $helper->budget();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Dispatcher $events
|
||||
*/
|
||||
public function subscribe(Dispatcher $events)
|
||||
{
|
||||
$events->listen('laravel.booted', 'Firefly\Helper\Form\FormTrigger@registerFormExtensions');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user