add "slug" option
authorChristian Weiske <cweiske@cweiske.de>
Wed, 14 Sep 2016 15:21:11 +0000 (17:21 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 14 Sep 2016 15:21:11 +0000 (17:21 +0200)
src/shpub/Command/AbstractProps.php

index d1ef218..08dbc97 100644 (file)
@@ -41,6 +41,17 @@ class Command_AbstractProps
             )
         );
         $cmd->addOption(
+            'slug',
+            array(
+                'short_name'  => '-s',
+                'long_name'   => '--slug',
+                'description' => 'URL path',
+                'help_name'   => 'PATH',
+                'action'      => 'StoreString',
+                'default'     => null,
+            )
+        );
+        $cmd->addOption(
             'syndication',
             array(
                 'short_name'  => '-s',
@@ -77,6 +88,11 @@ class Command_AbstractProps
                 'category', $cmdRes->options['categories']
             );
         }
+        if ($cmdRes->options['slug'] !== null) {
+            $req->req->addPostParameter(
+                'slug', $cmdRes->options['slug']
+            );
+        }
         if (count($cmdRes->options['syndication'])) {
             $req->addPostParameter(
                 'syndication', $cmdRes->options['syndication']