Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile post reaction seed #26

Merged
merged 2 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CHANGELOG
- **New:** Seed for media gallery album reaction (#15)
- **New:** Seed for profile post (#16)
- **New:** Seed for profile post comment (#17)
- **New:** Seed for profile post reaction (#18)

## 1.1.0 Alpha 1 (`1010011`)

Expand Down
18 changes: 18 additions & 0 deletions Cli/Command/Seed/SeedProfilePostReaction.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace TickTackk\Seeder\Cli\Command\Seed;

use Symfony\Component\Console\Input\InputInterface;

class SeedProfilePostReaction extends AbstractSeedCommand
{
protected function getSeedName() : string
{
return 'profile-post-reaction';
}

protected function getContentTypePlural(InputInterface $input = null) : string
{
return 'Profile post reactions';
}
}
20 changes: 20 additions & 0 deletions Seed/ProfilePostReaction.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace TickTackk\Seeder\Seed;

class ProfilePostReaction extends AbstractContentReaction
{
protected function getEntityShortName() : string
{
return 'XF:ProfilePost';
}
protected function getUserIdColumn() : string
{
return 'user_id';
}

protected function getReactionRelationName() : string
{
return 'Reactions';
}
}