src/Model/LayoutBlockFormListener.php
public function getContentType(LayoutBlockInterface $layoutBlock = null)
	{
		if (is_null($layoutBlock) || !$classType = $layoutBlock->getClassType()) {
			if ($this->contentType) {
				return $this->contentType;
			}

			$contentTypes = $this->getContentTypes();

			$classType = $contentTypes[0]['class'];
		}

		return $classType;
	}
public function getContentType(LayoutBlockInterface $layoutBlock = null)
	{
		if (is_null($layoutBlock) || !$classType = $layoutBlock->getClassType()) {
			if ($this->contentType) {
				return $this->contentType;
			}

			$contentTypes = $this->getContentTypes();

			$classType = $contentTypes[0]['class'];
		}

		return $classType;
	}
public function getContentType ( LayoutBlockInterface $ layoutBlock = null ) { if ( is_null ( $ layoutBlock ) || ! $ classType = $ layoutBlock -> getClassType ( ) ) { if ( $ this -> contentType ) { return $ this -> contentType ; } $ contentTypes = $ this -> getContentTypes ( ) ; $ classType = $ contentTypes [ 0 ] [ 'class' ] ; } return $ classType ; }
Get the content type of the content object, if the object is new, use the first available type.

@param LayoutBlockInterface $layoutBlock

@return string
Get the content type of the content object if the object is new use the first available type .