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 | |
namespace Flarum\CustomLayout; | |
use Flarum\Support\Extension as BaseExtension; | |
use Illuminate\Events\Dispatcher; | |
use Flarum\Events\BuildClientView; | |
use Flarum\Forum\Actions\ClientAction as ForumClientAction; | |
class Extension extends BaseExtension |
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
var app = { | |
controller: function() { | |
var ctrl = this; | |
// Everything that we render, that could possibly change in the future, is | |
// an m.prop getter-setter function | |
ctrl.name = m.prop('Toby'); | |
ctrl.showing = m.prop(false); | |
ctrl.items = m.prop([ | |
m.prop(1), |
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
import Component from './component'; | |
class Widget extends Component { | |
init(ctrl) { | |
var props = this.props; | |
ctrl.counter = props.initialValue; | |
ctrl.increment = function() { | |
ctrl.counter++; |