Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
ImageContent Class Reference
Inheritance diagram for ImageContent:
AbstractSimpleObject ImageContentInterface

Public Member Functions

 getBase64EncodedData ()
 
 getType ()
 
 getName ()
 
 setBase64EncodedData ($data)
 
 setType ($mimeType)
 
 setName ($name)
 
- Public Member Functions inherited from AbstractSimpleObject
 __construct (array $data=[])
 
 setData ($key, $value)
 
 __toArray ()
 

Additional Inherited Members

- Data Fields inherited from ImageContentInterface
const BASE64_ENCODED_DATA = 'base64_encoded_data'
 
const TYPE = 'type'
 
const NAME = 'name'
 
- Protected Member Functions inherited from AbstractSimpleObject
 _get ($key)
 
- Protected Attributes inherited from AbstractSimpleObject
 $_data
 

Detailed Description

Image Content data object

@codeCoverageIgnore

Definition at line 16 of file ImageContent.php.

Member Function Documentation

◆ getBase64EncodedData()

getBase64EncodedData ( )

{Retrieve media data (base64 encoded content)

Returns
string
}

Returns
string

Implements ImageContentInterface.

Definition at line 23 of file ImageContent.php.

24  {
25  return $this->_get(self::BASE64_ENCODED_DATA);
26  }

◆ getName()

getName ( )

{Retrieve image name

Returns
string
}

Returns
string

Implements ImageContentInterface.

Definition at line 43 of file ImageContent.php.

44  {
45  return $this->_get(self::NAME);
46  }

◆ getType()

getType ( )

{Retrieve MIME type

Returns
string
}

Returns
string

Implements ImageContentInterface.

Definition at line 33 of file ImageContent.php.

34  {
35  return $this->_get(self::TYPE);
36  }

◆ setBase64EncodedData()

setBase64EncodedData (   $data)

{Set media data (base64 encoded content)

Parameters
string$data
Returns
$this
}

Parameters
string$data
Returns
$this

Implements ImageContentInterface.

Definition at line 54 of file ImageContent.php.

55  {
56  return $this->setData(self::BASE64_ENCODED_DATA, $data);
57  }

◆ setName()

setName (   $name)

{Set image name

Parameters
string$name
Returns
$this
}

Parameters
string$name
Returns
$this

Implements ImageContentInterface.

Definition at line 76 of file ImageContent.php.

77  {
78  return $this->setData(self::NAME, $name);
79  }
if(!isset($_GET['name'])) $name
Definition: log.php:14

◆ setType()

setType (   $mimeType)

{Set MIME type

Parameters
string$mimeType
Returns
$this
}

Parameters
string$mimeType
Returns
$this

Implements ImageContentInterface.

Definition at line 65 of file ImageContent.php.

66  {
67  return $this->setData(self::TYPE, $mimeType);
68  }

The documentation for this class was generated from the following file: