本文整理汇总了PHP中Fisharebest\Webtrees\Tree::getTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Tree::getTitle方法的具体用法?PHP Tree::getTitle怎么用?PHP Tree::getTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\Tree
的用法示例。
在下文中一共展示了Tree::getTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: applyWatermark
/**
* The media firewall passes in an image
* this function can manipulate the image however it wants
* before returning it back to the media firewall
*
* @param resource $im
* @param Tree $tree
*
* @return resource
*/
function applyWatermark($im, Tree $tree)
{
// text to watermark with
$word1_text = $tree->getTitle();
// maximum font size for “word1” ; will be automaticaly reduced to fit in the image
$word1_maxsize = 100;
// rgb color codes for text
$word1_color = '0,0,0';
// ttf font file to use
$word1_font = WT_ROOT . Config::FONT_DEJAVU_SANS_TTF;
// vertical position for the text to past; possible values are: top, middle or bottom, across
$word1_vpos = 'across';
// horizontal position for the text to past in media file; possible values are: left, right, top2bottom, bottom2top
// this value is used only if $word1_vpos=across
$word1_hpos = 'left';
$word2_text = $_SERVER['HTTP_HOST'];
$word2_maxsize = 20;
$word2_color = '0,0,0';
$word2_font = WT_ROOT . Config::FONT_DEJAVU_SANS_TTF;
$word2_vpos = 'top';
$word2_hpos = 'top2bottom';
embedText($im, $word1_text, $word1_maxsize, $word1_color, $word1_font, $word1_vpos, $word1_hpos);
embedText($im, $word2_text, $word2_maxsize, $word2_color, $word2_font, $word2_vpos, $word2_hpos);
return $im;
}