/**
  * @return ReversibleModerationInterface
  */
 public function getModeration()
 {
     $moderation = parent::getModeration();
     if ($moderation instanceof ReversibleModerationInterface) {
         return $moderation;
     }
 }
Esempio n. 2
0
 /**
  * @param User              $user
  * @param ModerationRequest $request
  */
 public function logReverseFromRequest(User $user, ModerationRequest $request)
 {
     $this->log($user, $request->getModeration(), new Collection($request->getModeratableContent()), $request->getClientIp(), true, $request->getSource(), $request->getDestination());
 }
Esempio n. 3
0
 /**
  * @param ModerationRequest $request
  * @param string            $moderationName
  *
  * @return \Illuminate\View\View
  */
 public function form(ModerationRequest $request, $moderationName)
 {
     return view('partials.moderation.moderation_form', ['moderation' => $request->getModerationByName($moderationName), 'moderation_content' => $request->get('moderation_content'), 'moderation_ids' => $request->get('moderation_ids'), 'moderation_source_type' => $request->get('moderation_source_type'), 'moderation_source_id' => $request->get('moderation_source_id')]);
 }