commit
d7fd8e63a8
|
|
@ -30,6 +30,7 @@ class CmsController extends ControllerBase
|
|||
|
||||
/**
|
||||
* Extend this object properties upon construction.
|
||||
* @param Closure $callback
|
||||
*/
|
||||
public static function extend(Closure $callback)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class CmsObject implements ArrayAccess
|
|||
/**
|
||||
* Loads the object from a cache.
|
||||
* This method is used by the CMS in the runtime. If the cache is not found, it is created.
|
||||
* @param $theme Specifies the theme the object belongs to.
|
||||
* @param \Cms\Classes\Theme $theme Specifies the theme the object belongs to.
|
||||
* @param string $fileName Specifies the file name, with the extension.
|
||||
* @return mixed Returns a CMS object instance or null if the object wasn't found.
|
||||
*/
|
||||
|
|
@ -149,7 +149,7 @@ class CmsObject implements ArrayAccess
|
|||
/**
|
||||
* Loads the object from a file.
|
||||
* This method is used in the CMS back-end. It doesn't use any caching.
|
||||
* @param $theme Specifies the theme the object belongs to.
|
||||
* @param \Cms\Classes\Theme $theme Specifies the theme the object belongs to.
|
||||
* @param string $fileName Specifies the file name, with the extension.
|
||||
* The file name can contain only alphanumeric symbols, dashes and dots.
|
||||
* @return mixed Returns a CMS object instance or null if the object wasn't found.
|
||||
|
|
@ -446,7 +446,7 @@ class CmsObject implements ArrayAccess
|
|||
|
||||
/**
|
||||
* Returns the absolute file path.
|
||||
* @param $theme Specifies a theme the file belongs to.
|
||||
* @param \Cms\Classes\Theme $theme Specifies a theme the file belongs to.
|
||||
* @param string$fileName Specifies the file name to return the path to.
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ class CmsObjectCollection extends CollectionBase
|
|||
{
|
||||
/**
|
||||
* Returns objects that use the supplied component.
|
||||
* @param string|array $components
|
||||
* @param string|array $components
|
||||
* @param null|callback $callback
|
||||
* @return static
|
||||
*/
|
||||
public function withComponent($components, $callback = null)
|
||||
|
|
@ -41,6 +42,7 @@ class CmsObjectCollection extends CollectionBase
|
|||
* Returns objects whose properties match the supplied value.
|
||||
* @param string $property
|
||||
* @param string $value
|
||||
* @param bool $strict
|
||||
* @return static
|
||||
*/
|
||||
public function where($property, $value, $strict = true)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?php namespace Cms\Classes;
|
||||
|
||||
use Str;
|
||||
use Illuminate\Container\Container;
|
||||
use System\Classes\PluginManager;
|
||||
use SystemException;
|
||||
use Illuminate\Support\Facades\App;
|
||||
|
|
@ -81,6 +80,7 @@ class ComponentManager
|
|||
* });
|
||||
* </pre>
|
||||
*
|
||||
* @param callable $definitions
|
||||
* @return array Array values are class names.
|
||||
*/
|
||||
public function registerComponents(callable $definitions)
|
||||
|
|
@ -189,7 +189,7 @@ class ComponentManager
|
|||
|
||||
/**
|
||||
* Makes a component object with properties set.
|
||||
* @param $name A component class name or code.
|
||||
* @param string $name A component class name or code.
|
||||
* @param CmsObject $cmsObject The Cms object that spawned this component.
|
||||
* @param array $properties The properties set by the Page or Layout.
|
||||
* @return ComponentBase The component object.
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class Layout extends CmsCompoundObject
|
|||
|
||||
/**
|
||||
* Initializes the fallback layout.
|
||||
* @param \Cms\ClassesTheme $theme Specifies a theme the file belongs to.
|
||||
* @param \Cms\Classes\Theme $theme Specifies a theme the file belongs to.
|
||||
* @return \Cms\Classes\Layout
|
||||
*/
|
||||
public static function initFallback($theme)
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ class MediaLibrary
|
|||
/**
|
||||
* Initializes a library item from a path and item type.
|
||||
* @param string $path Specifies the item path relative to the storage disk root.
|
||||
* @param string $type Specifies the item type.
|
||||
* @param string $itemType Specifies the item type.
|
||||
* @return mixed Returns the MediaLibraryItem object or NULL if the item is not visible.
|
||||
*/
|
||||
protected function initLibraryItem($path, $itemType)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ class ThemeManager
|
|||
|
||||
/**
|
||||
* Flags a theme as being installed, so it is not downloaded twice.
|
||||
* @param string $name Theme code
|
||||
* @param string $code Theme code
|
||||
* @param string|null $dirName
|
||||
*/
|
||||
public function setInstalled($code, $dirName = null)
|
||||
{
|
||||
|
|
@ -55,7 +56,7 @@ class ThemeManager
|
|||
|
||||
/**
|
||||
* Flags a theme as being uninstalled.
|
||||
* @param string $name Theme code
|
||||
* @param string $code Theme code
|
||||
*/
|
||||
public function setUninstalled($code)
|
||||
{
|
||||
|
|
@ -89,7 +90,7 @@ class ThemeManager
|
|||
|
||||
/**
|
||||
* Completely delete a theme from the system.
|
||||
* @param string $id Theme code/namespace
|
||||
* @param string $theme Theme code/namespace
|
||||
* @return void
|
||||
*/
|
||||
public function deleteTheme($theme)
|
||||
|
|
|
|||
|
|
@ -671,12 +671,12 @@ class MediaManager extends WidgetBase
|
|||
|
||||
protected function setSidebarVisible($visible)
|
||||
{
|
||||
return $this->putSession('sideba_visible', !!$visible);
|
||||
return $this->putSession('sidebar_visible', !!$visible);
|
||||
}
|
||||
|
||||
protected function getSidebarVisible()
|
||||
{
|
||||
return $this->getSession('sideba_visible', true);
|
||||
return $this->getSession('sidebar_visible', true);
|
||||
}
|
||||
|
||||
protected function itemTypeToIconClass($item, $itemType)
|
||||
|
|
@ -1020,10 +1020,10 @@ class MediaManager extends WidgetBase
|
|||
/**
|
||||
* Creates a slug form the string. A modified version of Str::slug
|
||||
* with the main difference that it accepts @-signs
|
||||
* @param string
|
||||
* @param string $title
|
||||
* @return string
|
||||
*/
|
||||
protected function cleanFileName($name)
|
||||
protected function cleanFileName($title)
|
||||
{
|
||||
$title = Str::ascii($title);
|
||||
|
||||
|
|
@ -1083,7 +1083,8 @@ class MediaManager extends WidgetBase
|
|||
'url' => $url,
|
||||
'dimensions' => $dimensions
|
||||
];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// If the target dimensions are provided, resize the original image and return its URL
|
||||
// and dimensions.
|
||||
|
||||
|
|
@ -1107,7 +1108,8 @@ class MediaManager extends WidgetBase
|
|||
'dimensions' => $dimensions
|
||||
];
|
||||
}
|
||||
} catch (Exception $ex) {
|
||||
}
|
||||
catch (Exception $ex) {
|
||||
if ($sessionDirectoryCreated)
|
||||
@File::deleteDirectory($fullSessionDirectoryPath);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue