Created
October 7, 2015 17:12
-
-
Save carlcs/60e3d38af59cc56927d3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
namespace Craft; | |
class BusinessLogicPlugin extends BasePlugin | |
{ | |
public function getName() | |
{ | |
return 'Business Logic'; | |
} | |
public function getVersion() | |
{ | |
return '1.0'; | |
} | |
public function getDeveloper() | |
{ | |
return 'Admin'; | |
} | |
public function getDeveloperUrl() | |
{ | |
return 'https://example.com'; | |
} | |
public function modifyEntrySources(&$sources, $context) | |
{ | |
$newSources = array( | |
array('heading' => 'Post Formats'), | |
array( | |
'label' => 'Articles', | |
'criteria' => array('section' => 'blog', 'type' => 'article') | |
), | |
array( | |
'label' => 'Links', | |
'criteria' => array('section' => 'blog', 'type' => 'link') | |
) | |
); | |
$sources = array_merge($sources, $newSources); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create this file in craft/plugins/businesslogic/