Skip to content

Conversation

@rikh42
Copy link
Contributor

@rikh42 rikh42 commented Aug 26, 2014

This meant it was not possible to use an alias for a Facade in templates.

for example from the config (/rcrowe/twigbrige/extensions.php)
'HTML' => ['is_safe' => true, 'callback'=> 'markup'],

I would expect to then be able to use 'markup' in the template, like so: {{ markup.whatever() }}

This meant it was not possible to use an alias for a Facade in templates.

for example from the config (/rcrowe/twigbrige/extensions.php)
        'HTML' => ['is_safe' => true, 'callback'=> 'markup'],

Then in the template: {{ markup.whatever() }}
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling e038efd on rikh42:patch-1 into 78bad45 on rcrowe:master.

@barryvdh
Copy link
Collaborator

Sorry for the delay, I think I misunderstood your example. You probably mean it the other way around. You want to be able to call a facade by a different name. In the below example, all 3 should use the Input facade. But the last 2 aren't possible now.

'Input', // Input.get('name')
'inp' => 'Input', // inp.get('name') 
'inp' => ['callback'=> 'Input'], // inp.get('name')

Your PR fixes this. So the change is right but the example isn't ;)

barryvdh added a commit that referenced this pull request Oct 29, 2014
The callback option was not being honoured for Facades
@barryvdh barryvdh merged commit a6902e8 into rcrowe:master Oct 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants