Commit f4e5302d authored by dakwamine's avatar dakwamine Committed by Quang-Minh DANG
Browse files

Issue #3325513 by Dakwamine: Make the methods protected instead of private to...

Issue #3325513 by Dakwamine: Make the methods protected instead of private to ease extending DecoupledFormatter classes
parent ec1ae932
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ class ColorFieldDecoupledFormatter extends GenericDecoupledFormatter {
   * @return bool
   *   TRUE if using rgb(a), FALSE otherwise.
   */
  private function useRgba(): bool {
  protected function useRgba(): bool {
    return !empty($this->getSetting(static::SETTINGS__RGBA_OUTPUT));
  }

+2 −2
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ class ImageDecoupledFormatter extends FileDecoupledFormatter {
   * @return array
   *   Array of image styles.
   */
  private function getImageStyleList() {
  protected function getImageStyleList() {
    return image_style_options(FALSE);
  }

@@ -288,7 +288,7 @@ class ImageDecoupledFormatter extends FileDecoupledFormatter {
   * @return array
   *   Array containing string indexed values.
   */
  private function getCommonImageProperties(ImageItem $item) {
  protected function getCommonImageProperties(ImageItem $item) {
    try {
      $title = $item->get('title')->getValue();
    }
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ class ImageGenericDecoupledFormatter extends FileDecoupledFormatter {
   * @return array
   *   Array containing string indexed values.
   */
  private function getCommonImageProperties(ImageItem $item) {
  protected function getCommonImageProperties(ImageItem $item) {
    try {
      $title = $item->get("title")->getValue();
    }
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ class JsonDecoupledFormatter extends GenericDecoupledFormatter {
   * @return bool
   *   Returns TRUE if string is a valid JSON. Otherwise returns FALSE.
   */
  private function isJson($string) {
  protected function isJson($string) {
    return (is_string($string) && is_array(Json::decode($string)) && (json_last_error() == JSON_ERROR_NONE));
  }