Go to file
Christopher Pitt 0181932591 Add documentation + alias 2015-04-28 11:55:33 +12:00
code Added tests and extra ajax functionality 2015-04-27 10:38:46 +12:00
css Correct close button image 2015-04-24 04:33:07 +12:00
js Added tests and extra ajax functionality 2015-04-27 10:38:46 +12:00
templates Moved source code 2015-04-14 13:15:28 +12:00
tests/unit Added tests and extra ajax functionality 2015-04-27 10:38:46 +12:00
.gitignore Moved source code 2015-04-14 13:15:28 +12:00
.travis.yml Added tests and extra ajax functionality 2015-04-27 10:38:46 +12:00
README.md Add documentation + alias 2015-04-28 11:55:33 +12:00
_config.php Moved source code 2015-04-14 13:15:28 +12:00
composer.json Add documentation + alias 2015-04-28 11:55:33 +12:00

README.md

TagField Module

Build Status

Maintainer Contact

  • Christopher Pitt (Nickname: assertchris) <chris (at) silverstripe (dot) com>

Requirements

  • SilverStripe 3.1 or newer
  • Database: MySQL 5+, SQLite3, Postgres 8.3, SQL Server 2008

Download/Information

Usage

class BlogPost extends DataObject {
	static $many_many = array(
		'BlogTags' => 'BlogTag'
	);
}
class BlogTag extends DataObject {
	static $db = array(
		'Title' => 'Varchar(200)',
	);

	static $belongs_many_many = array(
		'BlogPosts' => 'BlogPost'
	);
}
$all    = BlogTags::get()->map();
$linked = $post->BlogTags()->map();

$field = new TagField(
	'BlogTags', 'Blog Tags', $all, $linked
);