Returns the HTML code for insertion into the body.

@param string $uid Unique identifier for the output if the content is placed more than once on the same page
@return string HTML code
420396
public function getBody( $uid = '' )
	{
		$view = $this->getView();

		$html = '';
		foreach( $this->getSubClients() as $subclient ) {
			$html .= $subclient->setView( $view )->getBody( $uid );
		}
		$view->introBody = $html;

		/** client/html/checkout/confirm/intro/standard/template-body
		 * Relative path to the HTML body template of the checkout confirm intro client.
		 *
		 * The template file contains the HTML code and processing instructions
		 * to generate the result shown in the body of the frontend. The
		 * configuration string is the path to the template file relative
		 * to the templates directory (usually in client/html/templates).
		 *
		 * You can overwrite the template file configuration in extensions and
		 * provide alternative templates. These alternative templates should be
		 * named like the default one but with the string "standard" replaced by
		 * an unique name. You may use the name of your project for this. If
		 * you've implemented an alternative client class as well, "standard"
		 * should be replaced by the name of the new class.
		 *
		 * The introduction part of the checkout confirm html client allows to use
		 * a different template for each payment status value. You can create a
		 * template for each payment status and store it in the "checkout/confirm/<status number>/"
		 * directory below the "templates" directory (usually in client/html/templates).
		 * If no specific layout template is found, the common template in the
		 * "checkout/confirm/" directory is used.
		 *
		 * @param string Relative path to the template creating code for the HTML page body
		 * @since 2014.03
		 * @since 2014.07 - one template for each payment status
		 * @category Developer
		 * @see client/html/checkout/confirm/intro/standard/template-header
		 */
		$tplconf = 'client/html/checkout/confirm/intro/standard/template-body';

		$status = $view->confirmOrderItem->getPaymentStatus();
		$default = array( 'checkout/confirm/' . $status . '/intro-body-standard', 'checkout/confirm/intro-body-standard' );

		return $view->render( $view->config( $tplconf, $default ) );
	}
1172944
public function getHeader( $uid = '' )
	{
		$view = $this->getObject()->addData( $this->getView() );

		$content = '';
		foreach( $this->getSubClients() as $subclient ) {
			$content .= $subclient->setView( $view )->getHeader( $uid );
		}
		$view->voucherHeader = $content;


		$addr = $view->extAddressItem;

		$msg = $view->mail();
		$msg->addHeader( 'X-MailGenerator', 'Aimeos' );
		$msg->addTo( $addr->getEMail(), $addr->getFirstName() . ' ' . $addr->getLastName() );


		/** client/html/email/from-name
		 * @see client/html/email/voucher/from-email
		 */
		$fromName = $view->config( 'client/html/email/from-name' );

		/** client/html/email/voucher/from-name
		 * Name used when sending voucher e-mails
		 *
		 * The name of the person or e-mail voucher that is used for sending all
		 * shop related voucher e-mails to customers. This configuration option
		 * overwrite the name set in "client/html/email/from-name".
		 *
		 * @param string Name shown in the e-mail
		 * @since 2018.07
		 * @category User
		 * @see client/html/email/from-name
		 * @see client/html/email/from-email
		 * @see client/html/email/reply-email
		 * @see client/html/email/bcc-email
		 */
		$fromNameVoucher = $view->config( 'client/html/email/voucher/from-name', $fromName );

		/** client/html/email/from-email
		 * @see client/html/email/voucher/from-email
		 */
		$fromEmail = $view->config( 'client/html/email/from-email' );

		/** client/html/email/voucher/from-email
		 * E-Mail address used when sending voucher e-mails
		 *
		 * The e-mail address of the person or voucher that is used for sending
		 * all shop related product notification e-mails to customers. This configuration option
		 * overwrites the e-mail address set via "client/html/email/from-email".
		 *
		 * @param string E-mail address
		 * @since 2018.07
		 * @category User
		 * @see client/html/email/voucher/from-name
		 * @see client/html/email/from-email
		 * @see client/html/email/reply-email
		 * @see client/html/email/bcc-email
		 */
		if( ( $fromEmailVoucher = $view->config( 'client/html/email/voucher/from-email', $fromEmail ) ) != null ) {
			$msg->addFrom( $fromEmailVoucher, $fromNameVoucher );
		}


		/** client/html/email/reply-name
		 * @see client/html/email/voucher/reply-email
		 */
		$replyName = $view->config( 'client/html/email/reply-name', $fromName );

		/** client/html/email/voucher/reply-name
		 * Recipient name displayed when the customer replies to voucher e-mails
		 *
		 * The name of the person or e-mail voucher the customer should
		 * reply to in case of voucher related questions or problems. This
		 * configuration option overwrites the name set via
		 * "client/html/email/reply-name".
		 *
		 * @param string Name shown in the e-mail
		 * @since 2018.07
		 * @category User
		 * @see client/html/email/voucher/reply-email
		 * @see client/html/email/reply-name
		 * @see client/html/email/reply-email
		 * @see client/html/email/from-email
		 * @see client/html/email/bcc-email
		 */
		$replyNameVoucher = $view->config( 'client/html/email/voucher/reply-name', $replyName );

		/** client/html/email/reply-email
		 * @see client/html/email/voucher/reply-email
		 */
		$replyEmail = $view->config( 'client/html/email/reply-email', $fromEmail );

		/** client/html/email/voucher/reply-email
		 * E-Mail address used by the customer when replying to voucher e-mails
		 *
		 * The e-mail address of the person or e-mail voucher the customer
		 * should reply to in case of voucher related questions or problems.
		 * This configuration option overwrites the e-mail address set via
		 * "client/html/email/reply-email".
		 *
		 * @param string E-mail address
		 * @since 2018.07
		 * @category User
		 * @see client/html/email/voucher/reply-name
		 * @see client/html/email/reply-email
		 * @see client/html/email/from-email
		 * @see client/html/email/bcc-email
		 */
		if( ( $replyEmailVoucher = $view->config( 'client/html/email/voucher/reply-email', $replyEmail ) ) != null ) {
			$msg->addReplyTo( $replyEmailVoucher, $replyNameVoucher );
		}


		/** client/html/email/bcc-email
		 * @see client/html/email/voucher/bcc-email
		 */
		$bccEmail = $view->config( 'client/html/email/bcc-email' );

		/** client/html/email/voucher/bcc-email
		 * E-Mail address all voucher e-mails should be also sent to
		 *
		 * Using this option you can send a copy of all voucher related e-mails
		 * to a second e-mail voucher. This can be handy for testing and checking
		 * the e-mails sent to customers.
		 *
		 * It also allows shop owners with a very small volume of orders to be
		 * notified about voucher changes. Be aware that this isn't useful if the
		 * order volumne is high or has peeks!
		 *
		 * This configuration option overwrites the e-mail address set via
		 * "client/html/email/bcc-email".
		 *
		 * @param string|array E-mail address or list of e-mail addresses
		 * @since 2018.07
		 * @category User
		 * @category Developer
		 * @see client/html/email/bcc-email
		 * @see client/html/email/reply-email
		 * @see client/html/email/from-email
		 */
		if( ( $bccEmailVoucher = $view->config( 'client/html/email/voucher/bcc-email', $bccEmail ) ) != null )
		{
			foreach( (array) $bccEmailVoucher as $emailAddr ) {
				$msg->addBcc( $emailAddr );
			}
		}


		/** client/html/email/voucher/standard/template-header
		 * Relative path to the HTML header template of the voucher e-mail client.
		 *
		 * The template file contains the HTML code and processing instructions
		 * to generate the HTML code that is inserted into the HTML page header
		 * of the rendered page in the frontend. The configuration string is the
		 * path to the template file relative to the templates directory (usually
		 * in client/html/templates).
		 *
		 * You can overwrite the template file configuration in extensions and
		 * provide alternative templates. These alternative templates should be
		 * named like the default one but with the string "standard" replaced by
		 * an unique name. You may use the name of your project for this. If
		 * you've implemented an alternative client class as well, "standard"
		 * should be replaced by the name of the new class.
		 *
		 * The product notification e-mail HTML client allows to use a different template for
		 * each voucher status value. You can create a template for each voucher
		 * status and store it in the "email/voucher/<status number>/" directory
		 * below the "templates" directory (usually in client/html/templates). If no
		 * specific layout template is found, the common template in the
		 * "email/voucher/" directory is used.
		 *
		 * @param string Relative path to the template creating code for the HTML page head
		 * @since 2018.07
		 * @category Developer
		 * @see client/html/email/voucher/standard/template-body
		 */
		$tplconf = 'client/html/email/voucher/standard/template-header';

		return $view->render( $view->config( $tplconf, 'email/voucher/header-standard' ) ); ;
	}
751022
public function getBody( $uid = '' )
	{
		$view = $this->getObject()->addData( $this->getView() );

		$content = '';
		foreach( $this->getSubClients() as $subclient ) {
			$content .= $subclient->setView( $view )->getBody( $uid );
		}
		$view->voucherBody = $content;

		/** client/html/email/voucher/standard/template-body
		 * Relative path to the HTML body template of the voucher e-mail client.
		 *
		 * The template file contains the HTML code and processing instructions
		 * to generate the result shown in the body of the frontend. The
		 * configuration string is the path to the template file relative
		 * to the templates directory (usually in client/html/templates).
		 *
		 * You can overwrite the template file configuration in extensions and
		 * provide alternative templates. These alternative templates should be
		 * named like the default one but with the string "standard" replaced by
		 * an unique name. You may use the name of your project for this. If
		 * you've implemented an alternative client class as well, "standard"
		 * should be replaced by the name of the new class.
		 *
		 * The product notification e-mail HTML client allows to use a different template for
		 * each voucher status value. You can create a template for each voucher
		 * status and store it in the "email/voucher/<status number>/" directory
		 * below the "templates" directory (usually in client/html/templates). If no
		 * specific layout template is found, the common template in the
		 * "email/voucher/" directory is used.
		 *
		 * @param string Relative path to the template creating code for the HTML page body
		 * @since 2018.07
		 * @category Developer
		 * @see client/html/email/voucher/standard/template-header
		 */
		$tplconf = 'client/html/email/voucher/standard/template-body';

		return $view->render( $view->config( $tplconf, 'email/voucher/body-standard' ) );
	}
920686
public static function getTagGroupByUid(string $uid): TagGroup
    {
        $query = TagGroup::find();
        $query->andWhere(['uid' => $uid]);
        return $query->one() ?? new TagGroup();
    }
252180
public function findOneByTypeAndUid($type, $uid)
    {
        $content = null;
        $classname = AbstractClassContent::getClassnameByContentType($type);

        if (null === $content = $this->findOneBy(['_uid' => $uid])) {
            throw new \InvalidArgumentException(sprintf('No `%s` exists with uid `%s`.', $classname, $uid));
        }

        return $content;
    }
893000
protected function getContentObject($uid)
    {
        $contentTable = 'tt_content';
        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($contentTable);
        $queryBuilder
            ->select('*')
            ->from($contentTable)
            ->where($queryBuilder->expr()->eq('uid', $uid));
        $queryBuilder->getRestrictions()->removeAll();
        $data = $queryBuilder->execute()->fetch();

        $this->inlineHelper->addFilesToData($data, 'tt_content');
        $this->inlineHelper->addIrreToData($data);

        return $data;
    }
915299
private function __appendBodyId()
    {
        // trim "content" from beginning of class name
        $body_id = preg_replace("/^content/", '', get_class($this));

        // lowercase any uppercase letters and prefix with a hyphen
        $body_id = trim(
            preg_replace_callback(
                "/([A-Z])/",
                function($id) {
                    return "-" . strtolower($id[0]);
                },
                $body_id
            ),
            '-'
        );

        if (!empty($body_id)) {
            $this->Body->setAttribute('id', trim($body_id));
        }
    }
1010833
public function getBody( $uid = '' )
	{
		$view = $this->getView();

		$content = '';
		foreach( $this->getSubClients() as $subclient ) {
			$content .= $subclient->setView( $view )->getBody( $uid );
		}
		$view->summaryBody = $content;

		/** client/html/email/payment/text/summary/standard/template-body
		 * Relative path to the text body template of the email payment text summary client.
		 *
		 * The template file contains the text and processing instructions
		 * to generate the result shown in the body of the e-mail. The
		 * configuration string is the path to the template file relative
		 * to the templates directory (usually in client/html/templates).
		 *
		 * You can overwrite the template file configuration in extensions and
		 * provide alternative templates. These alternative templates should be
		 * named like the default one but with the string "standard" replaced by
		 * an unique name. You may use the name of your project for this. If
		 * you've implemented an alternative client class as well, "standard"
		 * should be replaced by the name of the new class.
		 *
		 * @param string Relative path to the template creating code for the e-mail body
		 * @since 2014.03
		 * @category Developer
		 * @see client/html/email/payment/text/summary/standard/template-header
		 */
		$tplconf = 'client/html/email/payment/text/summary/standard/template-body';
		$default = 'email/common/text-summary-body-standard';

		return $view->render( $view->config( $tplconf, $default ) );
	}
1271041
public function getPidFromUid($uid = 0)
    {
        $queryBuilder = self::getQueryBuilder();
        $triggerElement = $queryBuilder
            ->select('pid')
            ->from('tt_content')
            ->where(
                $queryBuilder->expr()->eq(
                    'uid',
                    $queryBuilder->createNamedParameter(abs($uid), \PDO::PARAM_INT)
                )
            )
            ->execute()
            ->fetch();
        $pid = (int)$triggerElement['pid'];
        return is_array($triggerElement) && $pid ? $pid : 0;
    }
89963
public function update($uid)
    {
        if (!Input::has('user')) {
            return $this->jsonErrorResponse('"user" is required.');
        }

        $user = Subbly::api('subbly.user')->update($uid, Input::get('user'));

        return $this->jsonResponse(array(
            'user' => $this->presenter->single($user),
        ),
        array(
            'status' => array(
                'code'    => 200,
                'message' => 'User updated',
            ),
        ));
    }
862448
public function getByUID($uid)
    {
        return array_filter($this->getComponents(), function ($item) use ($uid) {
            if (!$itemUid = $item->select('UID')) {
                return false;
            }
            $itemUid = current($itemUid)->getValue();

            return $uid === $itemUid;
        });
    }
282227
public static function gentoken($uid = '')
    {
        $str = microtime() . (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'unknow') . 
            $uid . '7200';

        $md5 = md5($str);

        $crypt = crypt($md5, 'CRYPT_SHA256');

        $md5 = md5($crypt);

        return substr(strrev($md5), 1);
    }
436658
public function standard_top_of_body_html() {
        global $CFG;
        $output = $this->page->requires->get_top_of_body_code($this);
        if ($this->page->pagelayout !== 'embedded' && !empty($CFG->additionalhtmltopofbody)) {
            $output .= "\n".$CFG->additionalhtmltopofbody;
        }

        // Give subsystems an opportunity to inject extra html content. The callback
        // must always return a string containing valid html.
        foreach (\core_component::get_core_subsystems() as $name => $path) {
            if ($path) {
                $output .= component_callback($name, 'before_standard_top_of_body_html', [], '');
            }
        }

        // Give plugins an opportunity to inject extra html content. The callback
        // must always return a string containing valid html.
        $pluginswithfunction = get_plugins_with_function('before_standard_top_of_body_html', 'lib.php');
        foreach ($pluginswithfunction as $plugins) {
            foreach ($plugins as $function) {
                $output .= $function();
            }
        }

        $output .= $this->maintenance_warning();

        return $output;
    }
163728
public function print_raw_body($uid, $formatted = true)
    {
        if (!$this->check_connection()) {
            return;
        }

        $this->conn->handlePartBody($this->folder, $uid, true, null, null, true, null, $formatted);
    }
1163598
public function unlike($uid) {
	  // check passed data
	  if(!is_string($uid)) {
	    // bad data passed
		  throw new LinkedInException('LinkedIn->unlike(): bad data passed, $uid must be of type string.');
	  }
    
    // construct the xml data
		$data = '<?xml version="1.0" encoding="UTF-8"?>
		         <is-liked>false</is-liked>';
		
		// send request
    $query    = self::_URL_API . '/v1/people/~/network/updates/key=' . $uid . '/is-liked';
    $response = $this->fetch('PUT', $query, $data);
    
  	/**
	   * Check for successful request (a 201 response from LinkedIn server) 
	   * per the documentation linked in method comments above.
	   */ 
    return $this->checkResponse(201, $response);
	}
911672
public function getHtmlBody()
    {
        $xpath = new DOMXPath($this->_doc);
        $bodyNodes = $xpath->query('/html/body')->item(0)->childNodes;

        $outputFragments = array();
        for ($count = 0; $count < $bodyNodes->length; $count++) {
            $outputFragments[] = $this->_doc->saveXML($bodyNodes->item($count));
        }

        return implode($outputFragments);
    }
1143166
public static function createGUID() {
        if (function_exists('com_create_guid')) {
            return substr(com_create_guid(),1,36);
        }
        else {
            mt_srand((double) microtime() * 10000);
            $charid = strtoupper(md5(uniqid(rand(), true)));
            $hyphen = chr(45);
            $uuid = substr($charid, 0, 8) . $hyphen .
                    substr($charid, 8, 4) . $hyphen .
                    substr($charid, 12, 4) . $hyphen .
                    substr($charid, 16, 4) . $hyphen .
                    substr($charid, 20, 12);

            return $uuid;
        }
    }