2017 © Pedro Peláez
 

craft-plugin amcommand

Command palette in Craft.

image

am-impact/amcommand

Command palette in Craft.

  • Wednesday, May 30, 2018
  • by hubertprein
  • Repository
  • 6 Watchers
  • 79 Stars
  • 2,621 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 7 Open issues
  • 21 Versions
  • 56 % Grown

The README.md

a&m command

Command palette in Craft; Because you can, (*1)

Functionality

If you have ever used Alfred, you know you'll be zipping through the control panel in no time!, (*2)

You can open the command palette by using the keyboard combination: (command key for Apple users) CTRL + SHIFT + P, or you click on Command in the CP navigation., (*3)

Use the keyboard arrows (up and down) to navigate to your desired command. When you hit the return key or click on a command, the command palette will navigate to the location and show what it's loading. Use (command key for Apple users) CTRL + RETURN (or click) to fire the command in a new window., (*4)

Palette, (*5)

Current commands

Default commands

Command Description
Content: Delete all entries Delete all entries in one of the available sections.
Content: Delete entries Delete an entry in one of the available sections.
Content: Edit entries Edit an entry in one of the available sections.
Content: New entry Create a new entry in one of the available sections.
Dashboard Redirect.
Globals: Edit Edit one of your globals.
Search on Craft Redirect - Search on Craft with given keywords.
Search on StackExchange Redirect - Search on StackExchange with given keywords.
Settings: Assets Redirect.
Settings: Categories Redirect.
Settings: Fields Redirect.
Settings: Fields - Duplicate Duplicate a field.
Settings: Fields - Edit Edit one of the fields.
Settings: Globals Redirect.
Settings: Globals - Global Sets Edit the settings for one of the globals.
Settings: New... Add something new in the settings...
Settings: Plugins Redirect.
Settings: Plugin settings Edit the settings for one of the enabled plugins
Settings: Routes Redirect.
Settings: Sections Redirect.
Settings: Sections - Edit Edit a section.
Settings: Sections - Edit entry type Edit an entry type of a section. (Field Layout and such)
Settings: Users Redirect.
Tasks Manage Craft tasks.
Tools Use one of the most used tools.
Users: Delete users Delete a user other than your own.
Users: Edit users Edit a user.
Users: Login as user Log in as a different user, and navigate to their dashboard.
Users: New user Create a user.
Sign out End current session.
My Account Redirect.

Special commands

Command Description
Content: Compare entry version Compare the current entry you are viewing in the CP with older versions.
Content: Duplicate entry Duplicate the current entry you are viewing in the CP.
Simply type! You will be able to search in elements directly when you haven't triggered a (deeper command, that returns a new list or such things) command yet.

Adding your own commands

If you'd like to add commands for a plugin you're developing, you can use the addCommands hook!, (*6)

Example

Add this to your main plugin file:, (*7)

public function addCommands() {
    $commands = array(
        array(
            'name' => 'Search on Google',
            'type' => 'Custom',
            'url'  => 'http://www.google.nl'
        ),
        array(
            'name' => 'My own plugin function in a service',
            'type' => 'Custom',
            'call' => 'yourPluginFunctionName',
            'service' => 'yourPluginServiceName'
        )
    );
    return $commands;
}

That's it! a&m Command Palette will add these two commands., (*8)

If you look at the second example, you see a call and service key. These can be used to load a new set of commands., (*9)

In your plugin's service yourPluginServiceName__ (e.g.: amCommand or amCommand_command), you'll create a new function called __yourPluginFunctionName. In here you could do the same thing as you see in the example, and just return the new set of commands., (*10)

Contact

If you have any questions or suggestions, don't hesitate to contact us. We would like to add more commands to the palette, so if you have any ideas then please let us know!, (*11)

The Versions

30/05 2018

dev-craft3

dev-craft3

Command palette in Craft.

  Sources   Download

MIT

The Requires

 

plugin command cms craftcms craft

30/05 2018

3.1.4

3.1.4.0

Command palette in Craft.

  Sources   Download

MIT

The Requires

 

plugin command cms craftcms craft

29/05 2018

3.1.3

3.1.3.0

Command palette in Craft.

  Sources   Download

MIT

The Requires

 

plugin command cms craftcms craft

15/12 2017

3.1.1

3.1.1.0

Command palette in Craft.

  Sources   Download

MIT

The Requires

 

plugin command cms craftcms craft

04/12 2017

3.1.0

3.1.0.0

Command palette in Craft.

  Sources   Download

MIT

The Requires

 

plugin command cms craftcms craft

08/11 2017

dev-master

9999999-dev

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

25/10 2017

2.2.0

2.2.0.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

13/07 2017

2.1.1

2.1.1.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

22/06 2017

2.1.0

2.1.0.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

14/06 2017

2.0.2

2.0.2.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

14/06 2017

2.0.1

2.0.1.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

14/06 2017

2.0.0

2.0.0.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

03/11 2016

dev-development

dev-development

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

03/11 2016

1.2.0

1.2.0.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

04/08 2016

1.1.8

1.1.8.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

02/05 2016

1.1.7

1.1.7.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

19/04 2016

1.1.6

1.1.6.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

18/04 2016

1.1.5

1.1.5.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

19/02 2016

1.1.4

1.1.4.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

10/12 2015

1.1.3

1.1.3.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein

01/12 2015

1.1.2

1.1.2.0

Command palette in Craft; Because you can

  Sources   Download

The Requires

 

by Hubert Prein