diff --git a/core/modules/filter/src/Entity/FilterFormat.php b/core/modules/filter/src/Entity/FilterFormat.php
index 4b00af1..c9b3ac7 100644
--- a/core/modules/filter/src/Entity/FilterFormat.php
+++ b/core/modules/filter/src/Entity/FilterFormat.php
@@ -128,6 +128,52 @@ public function id() {
   /**
    * {@inheritdoc}
    */
+  public function getWeight() {
+    return $this->weight;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getRoles() {
+    return $this->roles;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function isCacheable() {
+    return $this->cache > 0;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setWeight($weight) {
+    $this->set('weight', $weight);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setRoles($roles) {
+    $this->set('roles', $roles);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setCache($cache) {
+    $this->set('cache', $cache);
+    return $this;
+  }
+
+
+  /**
+   * {@inheritdoc}
+   */
   public function filters($instance_id = NULL) {
     if (!isset($this->filterCollection)) {
       $this->filterCollection = new FilterPluginCollection(\Drupal::service('plugin.manager.filter'), $this->filters);
diff --git a/core/modules/filter/src/FilterFormatInterface.php b/core/modules/filter/src/FilterFormatInterface.php
index b5e75ce..81043fa 100644
--- a/core/modules/filter/src/FilterFormatInterface.php
+++ b/core/modules/filter/src/FilterFormatInterface.php
@@ -84,4 +84,60 @@ public function getFilterTypes();
    */
   public function getHtmlRestrictions();
 
+  /**
+   * Returns the weight of the format in the text format selector.
+   *
+   * @return int
+   *   The weight of this format.
+   */
+  public function getWeight();
+
+  /**
+   * Returns the list of user role IDS.
+   *
+   * @return array
+   *   The role ID list.
+   */
+  public function getRoles();
+
+  /**
+   * Returns the cache status.
+   *
+   * @return bool
+   *   TRUE if the filter is cached.
+   */
+  public function isCacheable();
+
+  /**
+   * Sets the weight to the given value.
+   *
+   * @param int $weight
+   *   The desired weight.
+   *
+   * @return $this
+   */
+  public function setWeight($weight);
+
+  /**
+   * Sets the list of user role IDs to the given array.
+   *
+   * @param array $roles
+   *   The desired user role ID array.
+   *
+   * @return \Drupal\filter\FilterFormatInterface
+   *   The class instance this method is called on.
+   */
+  public function setRoles($roles);
+
+  /**
+   * Sets the cache value (whether or not text of this format can be cached).
+   *
+   * @param bool $cache
+   *   The desired cache value.
+   *
+   * @return \Drupal\filter\FilterFormatInterface
+   *   The class instance this method is called on.
+   */
+  public function setCache($cache);
+
 }
diff --git a/core/modules/filter/src/Tests/FilterDefaultConfigTest.php b/core/modules/filter/src/Tests/FilterDefaultConfigTest.php
index 5af4758..3a70b1a 100644
--- a/core/modules/filter/src/Tests/FilterDefaultConfigTest.php
+++ b/core/modules/filter/src/Tests/FilterDefaultConfigTest.php
@@ -40,13 +40,13 @@ function testInstallation() {
     $this->assertTrue((bool) $format);
     $this->assertEqual($format->id(), 'filter_test');
     $this->assertEqual($format->label(), 'Test format');
-    $this->assertEqual($format->get('weight'), 2);
+    $this->assertEqual($format->getWeight(), 2);
 
     // Verify that format default property values have been added/injected.
     $this->assertTrue($format->uuid());
 
     // Verify that the loaded format does not contain any roles.
-    $this->assertEqual($format->get('roles'), NULL);
+    $this->assertEqual($format->getRoles(), NULL);
     // Verify that the defined roles in the default config have been processed.
     $this->assertEqual(array_keys(filter_get_roles_by_format($format)), array(
       DRUPAL_ANONYMOUS_RID,
@@ -83,7 +83,7 @@ function testUpdateRoles() {
     ));
 
     // Attempt to change roles.
-    $format->set('roles', array(
+    $format->setRoles(), array(
       DRUPAL_AUTHENTICATED_RID,
     ));
     $format->save();
diff --git a/core/modules/filter/src/Tests/FilterFormatMethodsTest.php b/core/modules/filter/src/Tests/FilterFormatMethodsTest.php
new file mode 100644
index 0000000..148da9c
--- /dev/null
+++ b/core/modules/filter/src/Tests/FilterFormatMethodsTest.php
@@ -0,0 +1,78 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\filter\Tests\FilterFormatMethodsTest.
+ */
+
+namespace Drupal\filter\Tests;
+
+use Drupal\simpletest\KernelTestBase;
+
+/**
+ * Tests get and set methods on text format interface.
+ *
+ * @group block
+ */
+class FilterFormatMethodsTest extends KernelTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('filter');
+
+  /**
+   * Text format object.
+   *
+   * @var object
+   */
+  private $format;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp() {
+    parent::setUp();
+
+    $this->format = entity_create('filter_format', array());
+    $this->format->format = 'custom_format';
+    $this->format->name = 'Custom format';
+    $this->format->setFilterConfig('filter_url', array(
+      'status' => 1,
+      'settings' => array(
+        'filter_url_length' => 30,
+      ),
+    ));
+    $this->format->save();
+  }
+
+  /**
+   * Tests weight get and set method.
+   */
+  function testGetWeight() {
+    $weight = 0;
+    $this->assertIdentical(spl_object_hash($this->format->setWeight($weight)), spl_object_hash($this->format), format_string('Test weight set method for text format %format.', array('%format' => $this->format->name)));
+    $this->assertIdentical($this->format->getWeight(), $weight, format_string('Test weight get method for text format %format.', array('%format' => $this->format->name)));
+  }
+
+  /**
+   * Tests roles get and set method.
+   */
+  function testGetRoles() {
+    $roles = array(0,1);
+    $this->assertIdentical(spl_object_hash($this->format->setRoles($roles)), spl_object_hash($this->format), format_string('Test roles set method for text format %format.', array('%format' => $this->format->name)));
+    $this->assertIdentical($this->format->getRoles(), $roles, format_string('Test roles get method for text format %format.', array('%format' => $this->format->name)));
+  }
+
+  /**
+   * Tests cache get and set method.
+   */
+  function testIsCacheable() {
+    $is_cacheable = TRUE;
+    $this->assertIdentical(spl_object_hash($this->format->setCache($is_cacheable)), spl_object_hash($this->format), format_string('Test cache set method for text format %format.', array('%format' => $this->format->name)));
+    $this->assertIdentical($this->format->isCacheable(), $is_cacheable, format_string('Test cache get method for text format %format.', array('%format' => $this->format->name)));
+  }
+
+}
