mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
These are useful helpers, make them public
This commit is contained in:
parent
54adc840cb
commit
03bf0c8206
@ -1025,7 +1025,7 @@ class Controller extends BaseController
|
||||
* Searches the layout and page components by an alias
|
||||
* @return ComponentBase The component object, if found
|
||||
*/
|
||||
protected function findComponentByName($name)
|
||||
public function findComponentByName($name)
|
||||
{
|
||||
if (isset($this->page->components[$name])) {
|
||||
return $this->page->components[$name];
|
||||
@ -1047,7 +1047,7 @@ class Controller extends BaseController
|
||||
* Searches the layout and page components by an AJAX handler
|
||||
* @return ComponentBase The component object, if found
|
||||
*/
|
||||
protected function findComponentByHandler($handler)
|
||||
public function findComponentByHandler($handler)
|
||||
{
|
||||
foreach ($this->page->components as $component) {
|
||||
if (method_exists($component, $handler)) {
|
||||
@ -1068,7 +1068,7 @@ class Controller extends BaseController
|
||||
* Searches the layout and page components by a partial file
|
||||
* @return ComponentBase The component object, if found
|
||||
*/
|
||||
protected function findComponentByPartial($partial)
|
||||
public function findComponentByPartial($partial)
|
||||
{
|
||||
foreach ($this->page->components as $component) {
|
||||
$fileName = ComponentPartial::getFilePath($component, $partial);
|
||||
|
Loading…
x
Reference in New Issue
Block a user