Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
simple_sitemap
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
simple_sitemap
Commits
55f808b4
Commit
55f808b4
authored
Nov 30, 2018
by
Pawel G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3017036
by mitrpaka, gbyte.co: Drush command naming and aliases (prior to Drush 9)
parent
0dd61d19
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
simple_sitemap.drush.inc
simple_sitemap.drush.inc
+5
-3
src/Commands/SimplesitemapCommands.php
src/Commands/SimplesitemapCommands.php
+12
-2
No files found.
simple_sitemap.drush.inc
View file @
55f808b4
...
...
@@ -9,16 +9,18 @@
* Implements hook_drush_command().
*/
function
simple_sitemap_drush_command
()
{
$items
[
'simple
_
sitemap-generate'
]
=
[
$items
[
'simple
-
sitemap-generate'
]
=
[
'description'
=>
'Regenerate the XML sitemaps according to the module settings.'
,
'callback'
=>
'drush_simple_sitemap_generate'
,
'drupal dependencies'
=>
[
'simple_sitemap'
],
'aliases'
=>
[
'ssg'
],
];
$items
[
'simple
_
sitemap-rebuild-queue'
]
=
[
$items
[
'simple
-
sitemap-rebuild-queue'
]
=
[
'description'
=>
'Rebuild the sitemap queue for all sitemap variants.'
,
'callback'
=>
'drush_simple_sitemap_rebuild_queue'
,
'drupal dependencies'
=>
[
'simple_sitemap'
],
'aliases'
=>
[
'ssr'
],
];
return
$items
;
...
...
@@ -27,7 +29,7 @@ function simple_sitemap_drush_command() {
/**
* Callback function for hook_drush_command().
*
* Regenerate the XML sitemaps.
* Regenerate the XML sitemaps
according to the module settings
.
*/
function
drush_simple_sitemap_generate
()
{
\
Drupal
::
service
(
'simple_sitemap.generator'
)
->
generateSitemap
(
'drush'
);
...
...
src/Commands/SimplesitemapCommands.php
View file @
55f808b4
...
...
@@ -28,8 +28,13 @@ class SimplesitemapCommands extends DrushCommands {
* Regenerate the XML sitemaps according to the module settings.
*
* @command simple-sitemap:generate
*
* @usage drush simple-sitemap:generate
* Regenerate the XML sitemaps according to the module settings.
*
* @validate-module-enabled simple_sitemap
* @aliases ss:generate, ssg, simple_sitemap:generate, simple_sitemap-generate
*
* @aliases ssg, simple-sitemap-generate
*/
public
function
generate
()
{
$this
->
generator
->
generateSitemap
(
'drush'
);
...
...
@@ -39,8 +44,13 @@ class SimplesitemapCommands extends DrushCommands {
* Rebuild the sitemap queue for all sitemap variants.
*
* @command simple-sitemap:rebuild-queue
*
* @usage drush simple-sitemap:rebuild-queue
* Rebuild the sitemap queue for all sitemap variants.
*
* @validate-module-enabled simple_sitemap
* @aliases ss:rebuild-queue, ssr, simple_sitemap:rebuild-queue, simple_sitemap-rebuild-queue
*
* @aliases ssr, simple-sitemap-rebuild-queue
*/
public
function
rebuildQueue
()
{
$this
->
generator
->
rebuildQueue
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment