module = $module; } public function getOne($id = null) { if (!is_null($id)) { if (is_numeric($id)) { return ModuleModel::findOrFail($id); } else { return ModuleModel::where('alias', $id) ->firstOrFail(); } } else { return new ModuleModel(); } } public function getCreateContentTitle(ModuleModel $module) { $pageHeading = trans('admin/contents.new', ['name' => trans($module->name)]); if (is_callable([$module->handler, 'getCreateNewTitle'])) { $pageHeading = call_user_func([$module->handler, 'getCreateNewTitle']); } return $pageHeading; } public function getUpdateContentTitle(ModuleModel $module) { // TODO: Implement getUpdateContentTitle() method. } public function getOverviewTitle(ModuleModel $module) { $pageHeading = 'admin/contents.overview'; // does user want to filter results using module? if (!is_null($module) && is_callable([$module->handler, 'getOverviewTitle'])) { $pageHeading = call_user_func([$module->handler, 'getOverviewTitle']); } return $pageHeading; } public function all() { // TODO: Implement all() method. } }