* @throws \Exception
*/
- function __construct(FluidbookPublication $book, $variant = 'online', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false, ?FluidbookTheme $theme, $hybrid = false, ?Command $command)
+ function __construct(FluidbookPublication $book, $variant = 'online', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false, FluidbookTheme $theme=null, $hybrid = false, Command $command=null)
{
ExcelToArray::setCache($book->protected_path('fluidbookpublication/cache/exceltoarray'));
YoutubeDL::setCookiesFile(resource_path('yt-dlp/cookies.txt'), 'firefox');
}
}
if (!isset(static::$_names[$u])) {
- $u=User::find($u);
- if($u){
- static::$_names[$u] = $u->name;
+ $u = User::find($u);
+ if ($u) {
+ $uid = $u->id;
+ static::$_names[$uid] = $u->name;
} else {
- static::$_names[$u] = '-';
+ $uid = $u;
+ static::$_names[$uid] = '-';
}
+ } else {
+ $uid = $u;
}
- return static::$_names[$u];
+ return static::$_names[$uid];
}
public static function getMeta($book_id, $update = 'latest')
* @return string
*/
- public function render(?callable $callback)
+ public function render(?callable $callback=null)
{
return view('fluidbook_publication.link_editor_form', ['form' => $this, 'crud' => $this->crud])->render($callback);
}