Merge pull request #1010 from openclassify/dia

#2138 Remove unused code
This commit is contained in:
Muammer Top 2021-03-30 10:31:48 +03:00 committed by GitHub
commit bda95f5da4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 52 additions and 612 deletions

View File

@ -113,7 +113,7 @@ return [
],
'make_all_fields_required' => [
'name' => 'Make All Fields Required',
'instructions' => 'Require the user to fill the Price, Description and Location fields when creating an ad',
'instructions' => 'Require the user to fill the Price and Description fields when creating an ad',
],
'make_map_required' => [
'name' => 'Make Map Required',

View File

@ -593,8 +593,7 @@ class AdvsController extends PublicController
$configurations = $this->optionConfigurationRepository->getConf($adv->id);
$foreign_currencies = json_decode($adv->foreign_currencies, true);
if (isset($_COOKIE['currency']) && $adv->foreign_currencies && array_key_exists($_COOKIE['currency'], $foreign_currencies)) {
if (isset($_COOKIE['currency']) && $_COOKIE['currency'] && $adv->foreign_currencies && array_key_exists($_COOKIE['currency'], $foreign_currencies)) {
$adv->currency = $_COOKIE['currency'];
$adv->price = $foreign_currencies[$_COOKIE['currency']];
}

View File

@ -55,8 +55,10 @@
</label>
<div class="input-wrapper validate-phone">
{{ form.fields.phone.setValue(form.fields.phone.value).input|raw }}
<div id="default-phone-country" class="hidden">{{ setting_value('visiosoft.module.location::country_for_phone_field') }}</div>
{{ form.fields.phone.setAttributes({'maxlength': 15}).setValue(form.fields.phone.value).input|raw }}
<div id="default-phone-country" class="hidden">
{{ setting_value('visiosoft.module.location::country_for_phone_field') }}
</div>
</div>
</div>
</div>

View File

@ -20,24 +20,24 @@
<li class="country-data" data-content="{{ adv['country_id'] }}"
data-default="{{ setting_value('visiosoft.module.location::default_country') }}"
class="location-field country-data">
{{ form.fields.country.setAttributes({'required': true}).setOptions({})|raw }}
{{ form.fields.countrysetOptions({})|raw }}
</li>
<li class="city-data" data-content="{{ adv['city'] }}"
data-default="{{ setting_value('visiosoft.module.location::default_city') }}"
class="location-field city-data">
{{ form.fields.city.setAttributes({'required': true})|raw }}
{{ form.fields.city|raw }}
</li>
<li class="district-data" data-content="{{ adv['district'] }}"
class="location-field district-data">
{{ form.fields.district.setAttributes({'required': true})|raw }}
{{ form.fields.district|raw }}
</li>
<li class="neighborhood-data" data-content="{{ adv['neighborhood'] }}"
class="location-field neighborhood-data">
{{ form.fields.neighborhood.setAttributes({'required': true})|raw }}
{{ form.fields.neighborhood|raw }}
</li>
{% if not setting_value('visiosoft.module.advs::hide_village_field') %}
<li class="village-data" data-content="{{ adv['village'] }}" class="location-field">
{{ form.fields.village.setAttributes({'required': true})|raw }}
{{ form.fields.village|raw }}
</li>
{% endif %}
</ul>

View File

@ -62,7 +62,7 @@
}
}
svg {
svg, img {
margin-right: .75rem;
width: 1.5rem;
height: 1.5rem;

View File

@ -1,6 +1,5 @@
<?php namespace Visiosoft\ProfileModule\Adress;
use Illuminate\Support\Facades\Auth;
use Visiosoft\LocationModule\City\Contract\CityRepositoryInterface;
use Visiosoft\LocationModule\Country\Contract\CountryRepositoryInterface;
use Visiosoft\ProfileModule\Adress\Contract\AdressInterface;
@ -10,9 +9,10 @@ class AdressModel extends ProfileAdressEntryModel implements AdressInterface
{
public function getAdress($id = null)
{
if ($id == null) {
if (!$id) {
return AdressModel::query();
}
return AdressModel::query()->where('id', $id)->whereNull('deleted_at');
}
@ -23,10 +23,9 @@ class AdressModel extends ProfileAdressEntryModel implements AdressInterface
public function getUserAdress($id = null)
{
if ($id != null) {
return $this->query()->where('user_id', $id)->whereNull('deleted_at')->get();
}
return $this->query()->where('user_id', Auth::id())->whereNull('deleted_at')->get();
$id = auth_id_if_null($id);
return $this->query()->where('user_id', $id)->whereNull('deleted_at')->get();
}
public function getCountry()

View File

@ -5,19 +5,8 @@ use Anomaly\Streams\Platform\Entry\EntryRepository;
class AdressRepository extends EntryRepository implements AdressRepositoryInterface
{
/**
* The entry model.
*
* @var AdressModel
*/
protected $model;
/**
* Create a new AdressRepository instance.
*
* @param AdressModel $model
*/
public function __construct(AdressModel $model)
{
$this->model = $model;
@ -25,7 +14,7 @@ class AdressRepository extends EntryRepository implements AdressRepositoryInterf
public function findByUser($user_id)
{
return $this->newQuery()->where('user_id', $user_id)->get();
return $this->findAllBy('user_id', $user_id);
}
public function createAddress($name, $user_id, $first_name, $last_name, $country_id, $city_id, $content, $gsm_phone)

View File

@ -4,10 +4,6 @@ use Anomaly\Streams\Platform\Database\Seeder\Seeder;
class AdressSeeder extends Seeder
{
/**
* Run the seeder.
*/
public function run()
{
//

View File

@ -1,34 +1,22 @@
<?php namespace Visiosoft\ProfileModule\Adress\Command;
use Visiosoft\ProfileModule\Adress\Contract\AdressRepositoryInterface;
class GetAddress
{
/**
* @var $id
*/
protected $id;
/**
* GetProduct constructor.
* @param $id
*/
public function __construct($id)
{
$this->id = $id;
}
/**
* @param AdressRepositoryInterface $adressRepository
* @return \Anomaly\Streams\Platform\Model\EloquentModel|null
*/
public function handle(AdressRepositoryInterface $adressRepository)
public function handle(AdressRepositoryInterface $addressRepository)
{
if ($this->id) {
return $adressRepository->find($this->id);
return $addressRepository->find($this->id);
}
return null;
}
}

View File

@ -1,34 +1,22 @@
<?php namespace Visiosoft\ProfileModule\Adress\Command;
use Visiosoft\ProfileModule\Adress\Contract\AdressRepositoryInterface;
class GetAddressByUser
{
/**
* @var $id
*/
protected $id;
/**
* GetProduct constructor.
* @param $id
*/
public function __construct($id)
{
$this->id = $id;
}
/**
* @param AdressRepositoryInterface $adressRepository
* @return \Anomaly\Streams\Platform\Model\EloquentModel|null
*/
public function handle(AdressRepositoryInterface $adressRepository)
public function handle(AdressRepositoryInterface $addressRepository)
{
if ($this->id) {
return $adressRepository->findByUser($this->id);
return $addressRepository->findByUser($this->id);
}
return null;
}
}

View File

@ -4,5 +4,13 @@ use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
interface AdressInterface extends EntryInterface
{
public function getAdress($id = null);
public function getAdressFirst($id);
public function getUserAdress($id = null);
public function getCountry();
public function getCity();
}

View File

@ -1,9 +1,7 @@
<?php namespace Visiosoft\ProfileModule\Adress\Form;
class AdressFormFields
{
public function handle(AdressFormBuilder $builder)
{
$builder->setFields(

View File

@ -1,19 +1,10 @@
<?php namespace Visiosoft\ProfileModule\Adress\Form;
use Anomaly\UsersModule\User\Contract\UserInterface;
use Anomaly\UsersModule\User\Event\UserHasRegistered;
use Anomaly\UsersModule\User\Register\Command\HandleAutomaticRegistration;
use Anomaly\UsersModule\User\Register\Command\HandleEmailRegistration;
use Anomaly\UsersModule\User\Register\Command\HandleManualRegistration;
use Anomaly\UsersModule\User\UserActivator;
use Illuminate\Support\Facades\Auth;
class AdressFormHandler
{
public function handle(
AdressFormBuilder $builder)
public function handle(AdressFormBuilder $builder)
{
if (!$builder->canSave()) {
return;

View File

@ -1,9 +1,7 @@
<?php namespace Visiosoft\ProfileModule\Adress\FormCompany;
class AddressCompanyFormFields
{
public function handle(AddressCompanyFormBuilder $builder)
{
$builder->setFields(

View File

@ -2,12 +2,9 @@
use Illuminate\Support\Facades\Auth;
class AddressCompanyFormHandler
{
public function handle(
AddressCompanyFormBuilder $builder)
public function handle(AddressCompanyFormBuilder $builder)
{
if (!$builder->canSave()) {
return;

View File

@ -4,20 +4,6 @@ use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
class AdressTableBuilder extends TableBuilder
{
/**
* The table views.
*
* @var array|string
*/
protected $views = [
];
/**
* The table filters.
*
* @var array|string
*/
protected $filters = [
'search' => [
'filter' => 'search',
@ -25,13 +11,9 @@ class AdressTableBuilder extends TableBuilder
'adress_name',
],
],
'user',
];
/**
* The table columns.
*
* @var array|string
*/
protected $columns = [
'first_name' => 'entry.user.first_name',
'last_name' => 'entry.user.last_name',
@ -39,11 +21,6 @@ class AdressTableBuilder extends TableBuilder
'adress_gsm_phone'
];
/**
* The table buttons.
*
* @var array|string
*/
protected $buttons = [
'show' => [
'type' => 'primary',
@ -52,27 +29,17 @@ class AdressTableBuilder extends TableBuilder
],
];
/**
* The table actions.
*
* @var array|string
*/
protected $actions = [
'delete'
];
/**
* The table options.
*
* @var array
*/
protected $options = [];
/**
* The table assets.
*
* @var array
*/
protected $assets = [];
protected $assets = [
'scripts.js' => [
'visiosoft.module.advs::js/admin/filter-user.js',
],
'styles.css' => [
'visiosoft.module.advs::css/admin/filter-user.css',
'visiosoft.module.advs::css/custom.css',
],
];
}

View File

@ -5,19 +5,8 @@ use Anomaly\Streams\Platform\Entry\EntryRepository;
class EducationRepository extends EntryRepository implements EducationRepositoryInterface
{
/**
* The entry model.
*
* @var EducationModel
*/
protected $model;
/**
* Create a new EducationRepository instance.
*
* @param EducationModel $model
*/
public function __construct(EducationModel $model)
{
$this->model = $model;

View File

@ -5,10 +5,6 @@ use Visiosoft\ProfileModule\Education\Contract\EducationRepositoryInterface;
class EducationSeeder extends Seeder
{
/**
* Run the seeder.
*/
public function run()
{
$repository = app(EducationRepositoryInterface::class);

View File

@ -4,11 +4,6 @@ use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
class EducationFormBuilder extends FormBuilder
{
/**
* The form buttons.
*
* @var array|string
*/
protected $buttons = [
'cancel',
];

View File

@ -4,20 +4,10 @@ use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
class EducationTableBuilder extends TableBuilder
{
/**
* The table buttons.
*
* @var array|string
*/
protected $buttons = [
'edit'
];
/**
* The table actions.
*
* @var array|string
*/
protected $actions = [
'delete'
];

View File

@ -5,19 +5,8 @@ use Anomaly\Streams\Platform\Entry\EntryRepository;
class EducationPartRepository extends EntryRepository implements EducationPartRepositoryInterface
{
/**
* The entry model.
*
* @var EducationPartModel
*/
protected $model;
/**
* Create a new EducationPartRepository instance.
*
* @param EducationPartModel $model
*/
public function __construct(EducationPartModel $model)
{
$this->model = $model;

View File

@ -4,11 +4,6 @@ use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
class EducationPartFormBuilder extends FormBuilder
{
/**
* The form buttons.
*
* @var array|string
*/
protected $buttons = [
'cancel',
];

View File

@ -4,20 +4,10 @@ use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
class EducationPartTableBuilder extends TableBuilder
{
/**
* The table buttons.
*
* @var array|string
*/
protected $buttons = [
'edit'
];
/**
* The table actions.
*
* @var array|string
*/
protected $actions = [
'delete'
];

View File

@ -1,12 +1,7 @@
<?php namespace Visiosoft\ProfileModule\Http\Controller;
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
use Anomaly\Streams\Platform\Model\Profile\ProfileAdressEntryModel;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Visiosoft\LocationModule\City\Contract\CityRepositoryInterface;
use Visiosoft\ProfileModule\Adress\AdressModel;
use Visiosoft\ProfileModule\Adress\Form\AdressFormBuilder;
use Visiosoft\ProfileModule\Adress\Table\AdressTableBuilder;
use Anomaly\Streams\Platform\Http\Controller\AdminController;

View File

@ -10,13 +10,6 @@ use Anomaly\Streams\Platform\Http\Controller\AdminController;
class AdressController extends AdminController
{
/**
* Display an index of existing entries.
*
* @param AdressTableBuilder $table
* @return \Symfony\Component\HttpFoundation\Response
*/
public function index(AdressTableBuilder $table)
{
$table->setColumns(array_merge($table->getColumns(), [
@ -30,12 +23,6 @@ class AdressController extends AdminController
return $table->render();
}
/**
* Create a new entry.
*
* @param AdressFormBuilder $form
* @return \Symfony\Component\HttpFoundation\Response
*/
public function create(AdressFormBuilder $form)
{
$form->setOption('heading', "visiosoft.module.profile::field");
@ -43,13 +30,6 @@ class AdressController extends AdminController
return $form->render();
}
/**
* Edit an existing entry.
*
* @param AdressFormBuilder $form
* @param $id
* @return \Symfony\Component\HttpFoundation\Response
*/
public function edit(AdressFormBuilder $form, $id)
{
$form->setOption('heading', "visiosoft.module.profile::field");
@ -60,19 +40,20 @@ class AdressController extends AdminController
public function adressUpdate(AdressFormBuilder $form,Request $request,$id)
{
$error = $form->build()->validate()->getFormErrors()->getMessages();
if(!empty($error))
{
if(!empty($error)) {
return $this->redirect->back();
}
$New_value = $request->all();
unset($New_value['_token'],$New_value['action']);
unset($New_value['_token'], $New_value['action']);
ProfileAdressEntryModel::find($id)->update($New_value);
$message = [];
$message[] = trans('visiosoft.module.profile::message.adress_success_update');
if($request->get('action') == "save_create")
{
if ($request->get('action') == "save_create") {
return redirect('admin/profile/adress/create')->with('success', $message);
}
return $this->redirect->back()->with('success', $message);
}
}

View File

@ -6,36 +6,16 @@ use Anomaly\Streams\Platform\Http\Controller\AdminController;
class EducationController extends AdminController
{
/**
* Display an index of existing entries.
*
* @param EducationTableBuilder $table
* @return \Symfony\Component\HttpFoundation\Response
*/
public function index(EducationTableBuilder $table)
{
return $table->render();
}
/**
* Create a new entry.
*
* @param EducationFormBuilder $form
* @return \Symfony\Component\HttpFoundation\Response
*/
public function create(EducationFormBuilder $form)
{
return $form->render();
}
/**
* Edit an existing entry.
*
* @param EducationFormBuilder $form
* @param $id
* @return \Symfony\Component\HttpFoundation\Response
*/
public function edit(EducationFormBuilder $form, $id)
{
return $form->render($id);

View File

@ -6,36 +6,16 @@ use Anomaly\Streams\Platform\Http\Controller\AdminController;
class EducationPartController extends AdminController
{
/**
* Display an index of existing entries.
*
* @param EducationPartTableBuilder $table
* @return \Symfony\Component\HttpFoundation\Response
*/
public function index(EducationPartTableBuilder $table)
{
return $table->render();
}
/**
* Create a new entry.
*
* @param EducationPartFormBuilder $form
* @return \Symfony\Component\HttpFoundation\Response
*/
public function create(EducationPartFormBuilder $form)
{
return $form->render();
}
/**
* Edit an existing entry.
*
* @param EducationPartFormBuilder $form
* @param $id
* @return \Symfony\Component\HttpFoundation\Response
*/
public function edit(EducationPartFormBuilder $form, $id)
{
return $form->render($id);

View File

@ -6,13 +6,11 @@ use Anomaly\Streams\Platform\Model\Users\UsersUsersEntryModel;
use Anomaly\UsersModule\User\Contract\UserRepositoryInterface;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Rinvex\Subscriptions\Models\Plan;
use Visiosoft\AdvsModule\Adv\AdvModel;
use Visiosoft\AdvsModule\Adv\Event\ChangeStatusAd;
use Visiosoft\AdvsModule\Status\Contract\StatusRepositoryInterface;
use Visiosoft\LocationModule\Country\CountryModel;
use Visiosoft\AlgoliaModule\Search\SearchModel;
use Visiosoft\CloudsiteModule\CloudsiteModule;
use Visiosoft\PackagesModule\Http\Controller\PackageFEController;
use Visiosoft\MessagesModule\Message\MessageModel;
use Visiosoft\PackagesModule\Package\PackageModel;
@ -65,7 +63,6 @@ class MyProfileController extends PublicController
$isActivePackages = $isActivePackages->is_enabled('packages');
if ($isActivePackages) {
//Search Last Time Packages By User
$TimePackages = new PackageFEController();
$LastTimePackages = $TimePackages->getPackagesByUser('lasttime');

View File

@ -7,24 +7,14 @@ use Anomaly\UsersModule\User\Contract\UserInterface;
use Anomaly\UsersModule\User\Contract\UserRepositoryInterface;
use Anomaly\UsersModule\User\Event\UserWasLoggedIn;
use Visiosoft\AdvsModule\Adv\AdvModel;
use Visiosoft\CloudsiteModule\Site\Event\CreateSite;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;
use Visiosoft\CloudsiteModule\Site\SiteModel;
use Visiosoft\ProfileModule\Profile\ProfileRepository;
use Visiosoft\SubscriptionsModule\User\UserModel;
/**
* Class UserAuthenticator
*
* @link http://visiosoft.com.tr/
* @author Visiosoft, Inc. <support@visiosoft.com.tr>
* @author Vedat Akdoğan <vedat@visiosoft.com.tr>
*/
class UserAuthenticator
{
protected $guard;
@ -34,7 +24,6 @@ class UserAuthenticator
protected $settings;
protected $advModel;
public function __construct(
Guard $guard,
Dispatcher $events,
@ -51,14 +40,6 @@ class UserAuthenticator
$this->settings = $settings;
}
/**
* Attempt to login a user.
*
* @param array $credentials
* @param bool $remember
* @return bool|UserInterface
*/
function valid_email($email)
{
return !!filter_var($email, FILTER_VALIDATE_EMAIL);
@ -103,12 +84,6 @@ class UserAuthenticator
return Redirect::back()->with('error', [trans('visiosoft.module.profile::message.login_error')]);
}
/**
* Attempt to authenticate the credentials.
*
* @param array $credentials
* @return bool|UserInterface
*/
public function authenticate(array $credentials)
{
$authenticators = $this->extensions
@ -132,12 +107,6 @@ class UserAuthenticator
return false;
}
/**
* Force login a user.
*
* @param UserInterface $user
* @param bool $remember
*/
public function login(UserInterface $user, $remember = false)
{
$this->guard->login($user, $remember);

View File

@ -4,16 +4,8 @@ use Anomaly\UsersModule\User\Contract\UserRepositoryInterface;
class GetProfileDetail
{
/**
* @var $id
*/
protected $id;
/**
* GetProduct constructor.
* @param $id
*/
public function __construct($id)
{
$this->id = $id;

View File

@ -5,12 +5,6 @@ use Anomaly\UsersModule\User\Validation\ValidateEmail;
class ProfileFormBuilder extends FormBuilder
{
/**
* The form fields.
*
* @var array|string
*/
protected $fields = [
'email' => [
'instructions' => false,
@ -26,55 +20,7 @@ class ProfileFormBuilder extends FormBuilder
],
];
/**
* Additional validation rules.
*
* @var array|string
*/
protected $rules = [];
/**
* Fields to skip.
*
* @var array|string
*/
protected $skips = [];
/**
* The form actions.
*
* @var array|string
*/
protected $actions = [];
/**
* The form buttons.
*
* @var array|string
*/
protected $buttons = [
'cancel',
];
/**
* The form options.
*
* @var array
*/
protected $options = [];
/**
* The form sections.
*
* @var array
*/
protected $sections = [];
/**
* The form assets.
*
* @var array
*/
protected $assets = [];
}

View File

@ -7,27 +7,12 @@ class ForgotPassFormBuilder extends FormBuilder
{
protected $user = null;
/**
* No model.
*
* @var bool
*/
protected $model = false;
/**
* The form actions.
*
* @var array
*/
protected $actions = [
'submit',
];
/**
* The form options.
*
* @var array
*/
protected $options = [
'redirect' => '/',
];

View File

@ -2,12 +2,6 @@
class ForgotPassFormFields
{
/**
* Handle the fields.
*
* @param ForgotPassFormBuilder $builder
*/
public function handle(ForgotPassFormBuilder $builder)
{
$builder->setFields(

View File

@ -8,16 +8,6 @@ use Visiosoft\ProfileModule\Profile\Events\SendForgotPasswordSms;
class ForgotPassFormHandler
{
/**
* Handle the form.
*
* @param ForgotPassFormBuilder $builder
* @param UserRepositoryInterface $users
* @param UserPassword $password
* @param MessageBag $messages
* @param Repository $config
*/
public function handle(
ForgotPassFormBuilder $builder,
UserRepositoryInterface $users,

View File

@ -2,7 +2,6 @@
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
class PasswordFormBuilder extends FormBuilder
{
protected $fields = [

View File

@ -4,11 +4,9 @@ use Anomaly\Streams\Platform\Entry\EntryPresenter;
class ProfilePresenter extends EntryPresenter
{
public function getNotification($type) {
$value = $this->object->$type;
if($value == 1)
{
if ($value == 1) {
return "checked";
}
}

View File

@ -8,17 +8,6 @@ use Illuminate\Http\Request;
class HandleActivateRequest
{
/**
* Handle the command.
*
* @param UserRepositoryInterface $users
* @param UserAuthenticator $authenticator
* @param UserActivator $activator
* @param Encrypter $encrypter
* @param Request $request
* @return bool
*/
public function handle(
UserRepositoryInterface $users,
UserAuthenticator $authenticator,

View File

@ -6,14 +6,6 @@ use Visiosoft\ProfileModule\Profile\Register2\Register2FormBuilder;
use Anomaly\UsersModule\User\UserActivator;
use Anomaly\UsersModule\User\UserAuthenticator;
/**
* Class HandleAutomaticRegistration
*
* @link http://openclassify.com/
* @author OpenClassify, Inc. <support@openclassify.com>
* @author Visiosoft Inc <support@openclassify.com>
*/
class HandleAutomaticRegistration
{
protected $builder;
@ -23,13 +15,6 @@ class HandleAutomaticRegistration
$this->builder = $builder;
}
/**
* Handle the command.
*
* @param UserAuthenticator $authenticator
* @param UserActivator $activator
* @param MessageBag $messages
*/
public function handle(UserAuthenticator $authenticator, UserActivator $activator, MessageBag $messages)
{
/* @var UserInterface $user */
@ -44,5 +29,4 @@ class HandleAutomaticRegistration
$messages->success('anomaly.module.users::message.logged_in');
}
}

View File

@ -14,12 +14,6 @@ class HandleEmailRegistration
$this->builder = $builder;
}
/**
* Handle the command.
*
* @param UserActivator $activator
* @param MessageBag $messages
*/
public function handle(UserActivator $activator, MessageBag $messages)
{
/* @var UserInterface $user */

View File

@ -7,13 +7,6 @@ use Visiosoft\ProfileModule\Profile\Register2\Register2FormBuilder;
use Illuminate\Contracts\Config\Repository;
use Illuminate\Notifications\AnonymousNotifiable;
/**
* Class HandleManualRegistration
*
* @link http://openclassify.com/
* @author OpenClassify, Inc. <support@openclassify.com>
* @author Visiosoft Inc <support@openclassify.com>
*/
class HandleManualRegistration
{
protected $builder;
@ -23,12 +16,6 @@ class HandleManualRegistration
$this->builder = $builder;
}
/**
* Handle the command.
*
* @param MessageBag $messages
* @param Repository $config
*/
public function handle(MessageBag $messages, Repository $config)
{
if (!is_null($message = $this->builder->getFormOption('pending_message'))) {

View File

@ -1,51 +1,22 @@
<?php namespace Visiosoft\ProfileModule\Profile\Register2;
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
use Visiosoft\ProfileModule\Profile\Register2\Command\SetOptions;
use Anomaly\UsersModule\User\UserModel;
/**
* Class RegisterFormBuilder
*
* @link http://openclassify.com/
* @author OpenClassify, Inc. <support@openclassify.com>
* @author Visiosoft Inc <support@openclassify.com>
*/
class Register2FormBuilder extends FormBuilder
{
/**
* The form roles.
*
* @var array
*/
protected $roles = [
'user',
];
/**
* The form model.
*
* @var string
*/
protected $model = UserModel::class;
/**
* The form actions.
*
* @var array
*/
protected $actions = [
'blue' => [
'text' => 'anomaly.module.users::button.register',
],
];
/**
* The form options.
*
* @var array
*/
protected $options = [
'redirect' => '/',
'success_message' => 'anomaly.module.users::success.user_registered',
@ -54,22 +25,11 @@ class Register2FormBuilder extends FormBuilder
'activated_message' => 'anomaly.module.users::message.account_activated',
];
/**
* Get the roles.
*
* @return array
*/
public function getRoles()
{
return $this->roles;
}
/**
* Set roles.
*
* @param $roles
* @return $this
*/
public function setRoles($roles)
{
$this->roles = $roles;

View File

@ -7,7 +7,6 @@ use Anomaly\UsersModule\User\Event\UserHasRegistered;
use Anomaly\UsersModule\User\UserActivator;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Support\Facades\Auth;
use Visiosoft\ProfileModule\Profile\Register2\Command\HandleAutomaticRegistration;
use Visiosoft\ProfileModule\Profile\Register2\Command\HandleEmailRegistration;
use Visiosoft\ProfileModule\Profile\Register2\Command\HandleManualRegistration;

View File

@ -5,7 +5,6 @@ use Anomaly\UsersModule\User\Contract\UserInterface;
use Anomaly\UsersModule\User\UserSecurity;
use Symfony\Component\HttpFoundation\Response;
class SignInFormBuilder extends FormBuilder
{
protected $model = false;

View File

@ -5,7 +5,6 @@ use Anomaly\UsersModule\User\UserSecurity;
use Illuminate\Routing\Redirector;
use Symfony\Component\HttpFoundation\Response;
class SignInFormHandler
{
public function handle(

View File

@ -3,7 +3,6 @@
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
use Anomaly\UsersModule\User\UserModel;
class UserFormBuilder extends FormBuilder
{

View File

@ -7,9 +7,6 @@ use Maatwebsite\Excel\Concerns\WithMapping;
class UsersExport implements WithMapping, FromCollection, WithHeadings
{
/**
* @return User[]|\Illuminate\Database\Eloquent\Collection|\Illuminate\Support\Collection
*/
public function collection()
{
return User::all();

View File

@ -10,7 +10,6 @@ use Symfony\Component\HttpFoundation\Response;
use Visiosoft\ProfileModule\Profile\Events\SendEmptyPassword;
use Visiosoft\ProfileModule\Profile\SignIn\SignInFormBuilder;
class ValidateCredentials
{
private $extensions;
@ -101,7 +100,6 @@ class ValidateCredentials
public function handle(SignInFormBuilder $builder)
{
if (!$response = $this->authenticate($builder->getPostData())) {
return false;
}

View File

@ -14,6 +14,7 @@ class ValidateRegister
$builder->addFormError('phone', trans('visiosoft.module.profile::message.registered_phone'));
return false;
}
return true;
}
}

View File

@ -1,79 +0,0 @@
<?php namespace Visiosoft\ProfileModule\Profile\sites;
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
use Rinvex\Subscriptions\Models\Plan;
use Visiosoft\CloudsiteModule\Site\SiteModel;
class SitesFormBuilder extends FormBuilder
{
protected $model = SiteModel::class;
/**
* The form fields.
*
* @var array|string
*/
protected $fields = [
'subdomain'
];
/**
* Additional validation rules.
*
* @var array|string
*/
protected $rules = [];
/**
* Fields to skip.
*
* @var array|string
*/
protected $skips = [];
/**
* The form actions.
*
* @var array|string
*/
protected $actions = [
'save' => [
'text' => 'visiosoft.module.subscriptions::button.create',
],
];
/**
* The form buttons.
*
* @var array|string
*/
protected $buttons = [
'cancel',
];
/**
* The form options.
*
* @var array
*/
protected $options = [
'redirect' => '/admin/subscriptions/',
];
/**
* The form sections.
*
* @var array
*/
protected $sections = [];
/**
* The form assets.
*
* @var array
*/
protected $assets = [];
}

View File

@ -4,26 +4,10 @@ use Anomaly\Streams\Platform\Addon\Module\Module;
class ProfileModule extends Module
{
/**
* The navigation display flag.
*
* @var bool
*/
protected $navigation = true;
/**
* The addon icon.
*
* @var string
*/
protected $icon = 'fa fa-user';
/**
* The module sections.
*
* @var array
*/
protected $sections = [
'adress' => [
'buttons' => [
@ -41,5 +25,4 @@ class ProfileModule extends Module
]
],
];
}

View File

@ -7,9 +7,6 @@ use Visiosoft\ProfileModule\Profile\Command\GetProfileDetail;
class ProfileModulePlugin extends Plugin
{
/**
* @return array
*/
public function getFunctions()
{
return [

View File

@ -1,45 +1,11 @@
<?php namespace Visiosoft\ProfileModule;
use Anomaly\FilesModule\Disk\Contract\DiskRepositoryInterface;
use Anomaly\FilesModule\Folder\Contract\FolderRepositoryInterface;
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
use Visiosoft\ProfileModule\Education\EducationSeeder;
use Visiosoft\ProfileModule\Seed\UsersFieldsSeeder;
class ProfileModuleSeeder extends Seeder
{
/**
* The disk repository.
*
* @var DiskRepositoryInterface
*/
protected $disks;
/**
* The folder repository.
*
* @var FolderRepositoryInterface
*/
protected $folders;
/**
* Create a new FolderSeeder instance.
*
* @param DiskRepositoryInterface $disks
* @param FolderRepositoryInterface $folders
*/
public function __construct(DiskRepositoryInterface $disks, FolderRepositoryInterface $folders)
{
parent::__construct();
$this->disks = $disks;
$this->folders = $folders;
}
/**
* Run the seeder.
*/
public function run()
{
// Users Fields Seeder

View File

@ -19,10 +19,8 @@ use Visiosoft\ProfileModule\Http\Middleware\OGImage;
use Visiosoft\ProfileModule\Profile\Password\ForgotPassFormBuilder;
use Visiosoft\ProfileModule\Profile\Password\PasswordFormBuilder;
use Visiosoft\ProfileModule\Profile\Profile\ProfileFormBuilder;
use Illuminate\Routing\Router;
use Visiosoft\ProfileModule\Profile\Register2\Register2FormBuilder;
use Visiosoft\ProfileModule\Profile\SignIn\SignInFormBuilder;
use Visiosoft\ProfileModule\Profile\sites\SitesFormBuilder;
use Visiosoft\ProfileModule\Profile\User\UserFormBuilder;
class ProfileModuleServiceProvider extends AddonServiceProvider
@ -137,7 +135,6 @@ class ProfileModuleServiceProvider extends AddonServiceProvider
AdressRepositoryInterface::class => AdressRepository::class,
EducationRepositoryInterface::class => EducationRepository::class,
'register2' => Register2FormBuilder::class,
'sites' => SitesFormBuilder::class,
'forgot_pass' => ForgotPassFormBuilder::class,
];