-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rias
committed
Dec 12, 2017
1 parent
7ca46da
commit 2f70499
Showing
7 changed files
with
89 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
/** | ||
* Scout plugin for Craft CMS 3.x | ||
* | ||
* Craft Scout provides a simple solution for adding full-text search to your entries. Scout will automatically keep your search indexes in sync with your entries. | ||
* | ||
* @link https://rias.be | ||
* @copyright Copyright (c) 2017 Rias | ||
*/ | ||
|
||
namespace rias\scout\jobs; | ||
|
||
use craft\base\Element; | ||
use craft\queue\BaseJob; | ||
use craft\queue\QueueInterface; | ||
use rias\scout\Scout; | ||
|
||
use Craft; | ||
|
||
/** | ||
* @author Rias | ||
* @package Scout | ||
* @since 0.1.0e | ||
*/ | ||
class DeIndexElement extends BaseJob | ||
{ | ||
// Properties | ||
// ========================================================================= | ||
|
||
/* @var Element */ | ||
public $element; | ||
|
||
// Public Methods | ||
// ========================================================================= | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function execute($queue) | ||
{ | ||
/* @var Element $event->sender */ | ||
Scout::$plugin->scoutService->deindexElement($this->element); | ||
} | ||
|
||
// Protected Methods | ||
// ========================================================================= | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function defaultDescription(): string | ||
{ | ||
return Craft::t('scout', 'De-indexing Element'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters