Tidying
Signed-off-by: Adam Engebretson <adam.engebretson@bridgeconx.com>
This commit is contained in:
1 parent
53b8b23bf9
commit
c4ae1f54de
1 file changed
+18
-5
+18
-5
@@ -518,21 +518,34 @@ class HtmlBuilder
|
|||||||
*
|
*
|
||||||
* @param $name
|
* @param $name
|
||||||
* @param array $arguments
|
* @param array $arguments
|
||||||
* @return string
|
* @return \Illuminate\Contracts\View\View
|
||||||
*/
|
*/
|
||||||
protected function renderComponent($name, array $arguments)
|
protected function renderComponent($name, array $arguments)
|
||||||
{
|
{
|
||||||
$component = static::$components[$name];
|
$component = static::$components[$name];
|
||||||
|
$data = $this->getComponentData($component['signature'], $arguments);
|
||||||
|
|
||||||
return $this->view->make($component['view'], array_combine($component['signature'], $arguments))->render();
|
return $this->view->make($component['view'], $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepare the component data.
|
||||||
|
*
|
||||||
|
* @param array $signature
|
||||||
|
* @param array $arguments
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function getComponentData(array $signature, array $arguments)
|
||||||
|
{
|
||||||
|
return array_combine($signature, $arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamically handle calls to the class.
|
* Dynamically handle calls to the class.
|
||||||
*
|
*
|
||||||
* @param $method
|
* @param string $method
|
||||||
* @param $parameters
|
* @param array $parameters
|
||||||
* @return mixed|string
|
* @return \Illuminate\Contracts\View\View|mixed
|
||||||
*
|
*
|
||||||
* @throws \BadMethodCallException
|
* @throws \BadMethodCallException
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user