本文整理汇总了PHP中Property::getTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Property::getTitle方法的具体用法?PHP Property::getTitle怎么用?PHP Property::getTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Property
的用法示例。
在下文中一共展示了Property::getTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendMessage
public function sendMessage($name, $email, $phone, $person_message = null)
{
$property_id = (int) $_POST['property_id'];
$property = new Property($property_id);
$property->fetch();
$message_format = estetico_get_setting('agent_message_format');
$message = str_replace('%person_name%', $name, $message_format);
$message = str_replace('%person_email%', $email, $message);
$message = str_replace('%person_phone%', $phone, $message);
$message = str_replace('%person_message%', $person_message, $message);
$message = str_replace('%agent_name%', $this->getName(), $message);
$message = str_replace('%property_name%', $property->getTitle(), $message);
$message = str_replace('%property_link%', '<a href="' . $property->getLink() . '">' . $property->getLink() . '</a>', $message);
$message = nl2br($message);
$headers = "Content-Type:text/html;charset=utf-8\r\n";
$headers .= "From: " . $name . ' <' . $email . '>' . "\r\n";
$success = false;
$recipient = $this->getEmail();
if (mail($recipient, __('Contact message about a property', THEME_NAME), $message, $headers)) {
$success = true;
}
return $success;
}
示例2:
<?php
} else {
?>
<div class="message error box"><?php
echo __('There was an error while trying to connect with our agent. Please try again later.', THEME_NAME);
?>
</div>
<?php
}
?>
<?php
}
?>
<h2 class="page-title"><?php
echo $property->getTitle();
?>
</h2>
<?php
} else {
?>
<h1 class="entry-title">
<a href="<?php
the_permalink();
?>
" rel="bookmark"><?php
echo $property->getTitle();
?>
</a>
</h1>
<?php