clearAssetDefinitions -> flushAssets

This commit is contained in:
Samuel Georges 2016-04-12 18:04:15 +10:00
parent d652c854b1
commit ba57dd8993
3 changed files with 7 additions and 4 deletions

View File

@ -15,6 +15,9 @@ trait InspectableContainer
{
public function onInspectableGetOptions()
{
// Disable asset broadcasting
$this->flushAssets();
$property = trim(Request::input('inspectorProperty'));
if (!$property) {
throw new ApplicationException('The property name is not specified.');
@ -30,7 +33,7 @@ trait InspectableContainer
throw new ApplicationException('The options cannot be loaded for the specified class.');
}
$obj = new $className(null);
$obj = new $className;
// Nested properties have names like object.property.
// Convert them to Object.Property.

View File

@ -200,8 +200,8 @@ class Table extends WidgetBase
public function onServerGetRecords()
{
// Disable assets
$this->controller->clearAssetDefinitions();
// Disable asset broadcasting
$this->controller->flushAssets();
if ($this->isClientDataSource()) {
throw new SystemException('The Table widget is not configured to use the server data source.');

View File

@ -31,7 +31,7 @@ trait AssetMaker
* by specifically targeting the hasAssetsDefined method.
* @return void
*/
public function clearAssetDefinitions()
public function flushAssets()
{
$this->assets = ['js'=>[], 'css'=>[], 'rss'=>[]];
}