public function removeWrapper($content, $wrapperTag, $wrapperClass) {
		// Trim content from the white characters, so we can spot the wrapper
		// starting exactly from the beginning.
		$content = trim($content);

		// wrapper strings start && end
		$wrap = array(
			"<$wrapperTag class=\"$wrapperClass\">",
			"</$wrapperTag>",
		);

		// Only proceed if wrapper is found exactly at the beginning of the content
		if (0 !== strpos($content, $wrap[0])) {
			return $content;
		}

		$start  = strlen($wrap[0]);
		$length = strlen($content) - $start - strlen($wrap[1]);
		$content = substr($content, $start, $length);

		// In development context add extra HTML comments with info, what is what
		if ($this->isDevelopmentEnvironment() && ($contentCollectionNode = $this->getContentCollectionNode())) {
			// ContentCollection: add context path info around it
			if (strstr($wrapperClass, 'contentcollection')) {
				$contextPath = $contentCollectionNode->getContextPath();
				$content = "<!-- content collection START: $contextPath -->" . $content . "<!-- content collection END: $contextPath -->";
			}
			// Other NodeTypes: add node element name
			elseif (($node = $this->getNode())) {
				$nodeType = $node->getNodeType()->getName();
				$content  = "<!-- $nodeType -->" . $content . "<!-- /$nodeType -->";
			}
		}

		return $content;
	}
public function removeWrapper($content, $wrapperTag, $wrapperClass) {
		// Trim content from the white characters, so we can spot the wrapper
		// starting exactly from the beginning.
		$content = trim($content);

		// wrapper strings start && end
		$wrap = array(
			"<$wrapperTag class=\"$wrapperClass\">",
			"</$wrapperTag>",
		);

		// Only proceed if wrapper is found exactly at the beginning of the content
		if (0 !== strpos($content, $wrap[0])) {
			return $content;
		}

		$start  = strlen($wrap[0]);
		$length = strlen($content) - $start - strlen($wrap[1]);
		$content = substr($content, $start, $length);

		// In development context add extra HTML comments with info, what is what
		if ($this->isDevelopmentEnvironment() && ($contentCollectionNode = $this->getContentCollectionNode())) {
			// ContentCollection: add context path info around it
			if (strstr($wrapperClass, 'contentcollection')) {
				$contextPath = $contentCollectionNode->getContextPath();
				$content = "<!-- content collection START: $contextPath -->" . $content . "<!-- content collection END: $contextPath -->";
			}
			// Other NodeTypes: add node element name
			elseif (($node = $this->getNode())) {
				$nodeType = $node->getNodeType()->getName();
				$content  = "<!-- $nodeType -->" . $content . "<!-- /$nodeType -->";
			}
		}

		return $content;
	}
public function removeWrapper ( $ content , $ wrapperTag , $ wrapperClass ) { // Trim content from the white characters, so we can spot the wrapper // starting exactly from the beginning. $ content = trim ( $ content ) ; // wrapper strings start && end $ wrap = array ( "<$wrapperTag class=\"$wrapperClass\">" , "</$wrapperTag>" , ) ; // Only proceed if wrapper is found exactly at the beginning of the content if ( 0 !== strpos ( $ content , $ wrap [ 0 ] ) ) { return $ content ; } $ start = strlen ( $ wrap [ 0 ] ) ; $ length = strlen ( $ content ) - $ start - strlen ( $ wrap [ 1 ] ) ; $ content = substr ( $ content , $ start , $ length ) ; // In development context add extra HTML comments with info, what is what if ( $ this -> isDevelopmentEnvironment ( ) && ( $ contentCollectionNode = $ this -> getContentCollectionNode ( ) ) ) { // ContentCollection: add context path info around it if ( strstr ( $ wrapperClass , 'contentcollection' ) ) { $ contextPath = $ contentCollectionNode -> getContextPath ( ) ; $ content = "<!-- content collection START: $contextPath -->" . $ content . "<!-- content collection END: $contextPath -->" ; } // Other NodeTypes: add node element name elseif ( ( $ node = $ this -> getNode ( ) ) ) { $ nodeType = $ node -> getNodeType ( ) -> getName ( ) ; $ content = "<!-- $nodeType -->" . $ content . "<!-- /$nodeType -->" ; } } return $ content ; }
Remove extra DIV wrapper, if it contains only the default CSS class
set in wrapperClass TS variable.

@param string $content
@param string $wrapperTag
@param string $wrapperClass
@return string
Remove extra DIV wrapper if it contains only the default CSS class set in wrapperClass TS variable .