Skip to content

Commit

Permalink
Updated to match changes in the latest credentials package
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Jan 3, 2015
1 parent 1bff03f commit 56a7600
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 247 deletions.
11 changes: 4 additions & 7 deletions app/Models/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@

namespace GrahamCampbell\BootstrapCMS\Models;

use GrahamCampbell\BootstrapCMS\Models\Relations\Common\BelongsToPostTrait;
use GrahamCampbell\BootstrapCMS\Models\Relations\Interfaces\BelongsToPostInterface;
use GrahamCampbell\BootstrapCMS\Models\Relations\BelongsToPostTrait;
use GrahamCampbell\Credentials\Models\AbstractModel;
use GrahamCampbell\Credentials\Models\Relations\Common\BelongsToUserTrait;
use GrahamCampbell\Credentials\Models\Relations\Common\RevisionableTrait;
use GrahamCampbell\Credentials\Models\Relations\Interfaces\BelongsToUserInterface;
use GrahamCampbell\Credentials\Models\Relations\Interfaces\RevisionableInterface;
use GrahamCampbell\Credentials\Models\Relations\BelongsToUserTrait;
use GrahamCampbell\Credentials\Models\Relations\RevisionableTrait;
use Illuminate\Database\Eloquent\SoftDeletes;
use McCool\LaravelAutoPresenter\HasPresenter;

Expand All @@ -33,7 +30,7 @@
* @copyright 2013-2014 Graham Campbell
* @license <https://github.com/GrahamCampbell/Bootstrap-CMS/blob/master/LICENSE.md> AGPL 3.0
*/
class Comment extends AbstractModel implements BelongsToPostInterface, BelongsToUserInterface, RevisionableInterface, HasPresenter
class Comment extends AbstractModel implements HasPresenter
{
use BelongsToPostTrait, BelongsToUserTrait, RevisionableTrait, SoftDeletes;

Expand Down
8 changes: 3 additions & 5 deletions app/Models/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
namespace GrahamCampbell\BootstrapCMS\Models;

use GrahamCampbell\Credentials\Models\AbstractModel;
use GrahamCampbell\Credentials\Models\Relations\Common\BelongsToUserTrait;
use GrahamCampbell\Credentials\Models\Relations\Common\RevisionableTrait;
use GrahamCampbell\Credentials\Models\Relations\Interfaces\BelongsToUserInterface;
use GrahamCampbell\Credentials\Models\Relations\Interfaces\RevisionableInterface;
use GrahamCampbell\Credentials\Models\Relations\BelongsToUserTrait;
use GrahamCampbell\Credentials\Models\Relations\RevisionableTrait;
use Illuminate\Database\Eloquent\SoftDeletes;
use McCool\LaravelAutoPresenter\HasPresenter;

Expand All @@ -31,7 +29,7 @@
* @copyright 2013-2014 Graham Campbell
* @license <https://github.com/GrahamCampbell/Bootstrap-CMS/blob/master/LICENSE.md> AGPL 3.0
*/
class Event extends AbstractModel implements BelongsToUserInterface, RevisionableInterface, HasPresenter
class Event extends AbstractModel implements HasPresenter
{
use BelongsToUserTrait, RevisionableTrait, SoftDeletes;

Expand Down
8 changes: 3 additions & 5 deletions app/Models/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
namespace GrahamCampbell\BootstrapCMS\Models;

use GrahamCampbell\Credentials\Models\AbstractModel;
use GrahamCampbell\Credentials\Models\Relations\Common\BelongsToUserTrait;
use GrahamCampbell\Credentials\Models\Relations\Common\RevisionableTrait;
use GrahamCampbell\Credentials\Models\Relations\Interfaces\BelongsToUserInterface;
use GrahamCampbell\Credentials\Models\Relations\Interfaces\RevisionableInterface;
use GrahamCampbell\Credentials\Models\Relations\BelongsToUserTrait;
use GrahamCampbell\Credentials\Models\Relations\RevisionableTrait;
use Illuminate\Database\Eloquent\SoftDeletes;
use McCool\LaravelAutoPresenter\HasPresenter;

Expand All @@ -31,7 +29,7 @@
* @copyright 2013-2014 Graham Campbell
* @license <https://github.com/GrahamCampbell/Bootstrap-CMS/blob/master/LICENSE.md> AGPL 3.0
*/
class Page extends AbstractModel implements BelongsToUserInterface, RevisionableInterface, HasPresenter
class Page extends AbstractModel implements HasPresenter
{
use BelongsToUserTrait, RevisionableTrait, SoftDeletes;

Expand Down
11 changes: 4 additions & 7 deletions app/Models/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@

namespace GrahamCampbell\BootstrapCMS\Models;

use GrahamCampbell\BootstrapCMS\Models\Relations\Common\HasManyCommentsTrait;
use GrahamCampbell\BootstrapCMS\Models\Relations\Interfaces\HasManyCommentsInterface;
use GrahamCampbell\BootstrapCMS\Models\Relations\HasManyCommentsTrait;
use GrahamCampbell\Credentials\Models\AbstractModel;
use GrahamCampbell\Credentials\Models\Relations\Common\BelongsToUserTrait;
use GrahamCampbell\Credentials\Models\Relations\Common\RevisionableTrait;
use GrahamCampbell\Credentials\Models\Relations\Interfaces\BelongsToUserInterface;
use GrahamCampbell\Credentials\Models\Relations\Interfaces\RevisionableInterface;
use GrahamCampbell\Credentials\Models\Relations\BelongsToUserTrait;
use GrahamCampbell\Credentials\Models\Relations\RevisionableTrait;
use Illuminate\Database\Eloquent\SoftDeletes;
use McCool\LaravelAutoPresenter\HasPresenter;

Expand All @@ -33,7 +30,7 @@
* @copyright 2013-2014 Graham Campbell
* @license <https://github.com/GrahamCampbell/Bootstrap-CMS/blob/master/LICENSE.md> AGPL 3.0
*/
class Post extends AbstractModel implements HasManyCommentsInterface, BelongsToUserInterface, RevisionableInterface, HasPresenter
class Post extends AbstractModel implements HasPresenter
{
use HasManyCommentsTrait, BelongsToUserTrait, RevisionableTrait, SoftDeletes;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* GNU Affero General Public License for more details.
*/

namespace GrahamCampbell\BootstrapCMS\Models\Relations\Common;
namespace GrahamCampbell\BootstrapCMS\Models\Relations;

/**
* This is the belongs to post trait.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* GNU Affero General Public License for more details.
*/

namespace GrahamCampbell\BootstrapCMS\Models\Relations\Common;
namespace GrahamCampbell\BootstrapCMS\Models\Relations;

/**
* This is the has many comments trait.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* GNU Affero General Public License for more details.
*/

namespace GrahamCampbell\BootstrapCMS\Models\Relations\Common;
namespace GrahamCampbell\BootstrapCMS\Models\Relations;

/**
* This is the has many events trait.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* GNU Affero General Public License for more details.
*/

namespace GrahamCampbell\BootstrapCMS\Models\Relations\Common;
namespace GrahamCampbell\BootstrapCMS\Models\Relations;

/**
* This is the has many pages trait.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* GNU Affero General Public License for more details.
*/

namespace GrahamCampbell\BootstrapCMS\Models\Relations\Common;
namespace GrahamCampbell\BootstrapCMS\Models\Relations;

/**
* This is the has many posts trait.
Expand Down
34 changes: 0 additions & 34 deletions app/Models/Relations/Interfaces/BelongsToPostInterface.php

This file was deleted.

41 changes: 0 additions & 41 deletions app/Models/Relations/Interfaces/HasManyCommentsInterface.php

This file was deleted.

41 changes: 0 additions & 41 deletions app/Models/Relations/Interfaces/HasManyEventsInterface.php

This file was deleted.

41 changes: 0 additions & 41 deletions app/Models/Relations/Interfaces/HasManyPagesInterface.php

This file was deleted.

41 changes: 0 additions & 41 deletions app/Models/Relations/Interfaces/HasManyPostsInterface.php

This file was deleted.

14 changes: 5 additions & 9 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@

namespace GrahamCampbell\BootstrapCMS\Models;

use GrahamCampbell\BootstrapCMS\Models\Relations\Common\HasManyCommentsTrait;
use GrahamCampbell\BootstrapCMS\Models\Relations\Common\HasManyEventsTrait;
use GrahamCampbell\BootstrapCMS\Models\Relations\Common\HasManyPagesTrait;
use GrahamCampbell\BootstrapCMS\Models\Relations\Common\HasManyPostsTrait;
use GrahamCampbell\BootstrapCMS\Models\Relations\Interfaces\HasManyCommentsInterface;
use GrahamCampbell\BootstrapCMS\Models\Relations\Interfaces\HasManyEventsInterface;
use GrahamCampbell\BootstrapCMS\Models\Relations\Interfaces\HasManyPagesInterface;
use GrahamCampbell\BootstrapCMS\Models\Relations\Interfaces\HasManyPostsInterface;
use GrahamCampbell\BootstrapCMS\Models\Relations\HasManyCommentsTrait;
use GrahamCampbell\BootstrapCMS\Models\Relations\HasManyEventsTrait;
use GrahamCampbell\BootstrapCMS\Models\Relations\HasManyPagesTrait;
use GrahamCampbell\BootstrapCMS\Models\Relations\HasManyPostsTrait;
use GrahamCampbell\Credentials\Models\User as CredentialsUser;

/**
Expand All @@ -33,7 +29,7 @@
* @copyright 2013-2014 Graham Campbell
* @license <https://github.com/GrahamCampbell/Bootstrap-CMS/blob/master/LICENSE.md> AGPL 3.0
*/
class User extends CredentialsUser implements HasManyPagesInterface, HasManyPostsInterface, HasManyEventsInterface, HasManyCommentsInterface
class User extends CredentialsUser
{
use HasManyPagesTrait, HasManyPostsTrait, HasManyEventsTrait, HasManyCommentsTrait;

Expand Down
5 changes: 2 additions & 3 deletions app/Repositories/EventRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
namespace GrahamCampbell\BootstrapCMS\Repositories;

use GrahamCampbell\Credentials\Repositories\AbstractRepository;
use GrahamCampbell\Credentials\Repositories\Common\PaginateRepositoryTrait;
use GrahamCampbell\Credentials\Repositories\Interfaces\PaginateRepositoryInterface;
use GrahamCampbell\Credentials\Repositories\PaginateRepositoryTrait;

/**
* This is the event repository class.
Expand All @@ -27,7 +26,7 @@
* @copyright 2013-2014 Graham Campbell
* @license <https://github.com/GrahamCampbell/Bootstrap-CMS/blob/master/LICENSE.md> AGPL 3.0
*/
class EventRepository extends AbstractRepository implements PaginateRepositoryInterface
class EventRepository extends AbstractRepository
{
use PaginateRepositoryTrait;
}
Loading

0 comments on commit 56a7600

Please sign in to comment.