Last active
May 25, 2016 06:34
-
-
Save wernerkrauss/761b77d3d454961700aa0b998b9e7c6a to your computer and use it in GitHub Desktop.
Some PHPStorm / Intellij IDEA file templates for SilverStripe development
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
<?php | |
#parse("PHP File Header.php") | |
class ${NAME} extends DataObject { | |
private static \$db = array(); | |
private static \$has_one = array(); | |
private static \$has_many = array(); | |
private static \$many_many = array(); | |
private static \$belongs_many_many = array(); | |
private static \$singular_name = '${Name}'; | |
private static \$plural_name = '${Name}s'; | |
private static \$summary_fields = array(); | |
private static \$searchable_fields = array(); | |
public function getCMSFields() { | |
\$fields = parent::getCMSFields(); | |
return \$fields; | |
} | |
} |
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
<?php | |
#parse("PHP File Header.php") | |
class ${NAME} extends Page { | |
private static \$db = array(); | |
private static \$has_one = array(); | |
private static \$has_many = array(); | |
private static \$many_many = array(); | |
private static \$belongs_many_many = array(); | |
private static \$singular_name = '${Name}'; | |
private static \$plural_name = '${Name}s'; | |
private static \$summary_fields = array(); | |
private static \$searchable_fields = array(); | |
public function getCMSFields() { | |
\$fields = parent::getCMSFields(); | |
return \$fields; | |
} | |
} | |
class ${NAME}_Controller extends Page_Controller { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment