Skip to content

Commit

Permalink
Overall improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyCyborg committed Apr 21, 2017
1 parent d263677 commit e4b3873
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn
*
* @var string
*/
const VERSION = '3.77.28';
const VERSION = '3.77.29';

/**
* Indicates if the application has "booted".
Expand Down
15 changes: 12 additions & 3 deletions src/Module/Generators/MakeModuleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ private function stepOne()
protected function generate()
{
$steps = array(
'Generating folders...' => 'generateFolders',
'Generating files...' => 'generateFiles',
'Generating .gitkeep...' => 'generateGitkeep',
'Generating folders...' => 'generateFolders',
'Generating files...' => 'generateFiles',
'Generating .gitkeep...' => 'generateGitkeep',
'Optimizing module cache...' => 'optimizeModules',
);

$progress = new ProgressBar($this->output, count($steps));
Expand Down Expand Up @@ -290,6 +291,14 @@ protected function generateGitkeep()
}
}

/**
* Reset module cache of enabled and disabled modules.
*/
protected function optimizeModules()
{
return $this->callSilent('module:optimize');
}

/**
* Get the path to the module.
*
Expand Down
26 changes: 23 additions & 3 deletions src/View/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,33 @@ public function alias($view, $alias)
/**
* Check if the view file exists.
*
* @param string $view
* @param string $view
* @param string|null $module
* @param string|null $theme
* @return bool
*/
public function exists($view, $module = null)
public function exists($view, $module = null, $theme = null)
{
try {
$this->find($view, $module);
$this->findViewFile($view, $module, $theme);
} catch (InvalidArgumentException $e) {
return false;
}

return true;
}

/**
* Check if the view file exists.
*
* @param string $layout
* @param string|null $theme
* @return bool
*/
public function layoutExists($layout, $theme = null)
{
try {
$this->findLayoutFile($layout, $theme);
} catch (InvalidArgumentException $e) {
return false;
}
Expand Down

0 comments on commit e4b3873

Please sign in to comment.