First Block:
app\code\Zero\Storelocator\Block\view\Attributes.php
function name : getLocationAttributes()
Second Block:
app\code\Zero\Storelocator\Block\Customerreview.php
How to get the first block function values ?
You can get this file in customerreview.php and call function from that file.
<?php
namespace Zero\Storelocator\Block;
class Customerreview extends \Magento\Framework\View\Element\Template
{
public function __construct(
\Zero\Storelocator\Block\view\Attributes $attributes,
\Magento\Framework\View\Element\Template\Context $context,
array $data = []
) {
$this->$attributes = $attributes;
parent::__construct($context, $data);
}
public function getCustomerReview(){
echo $this->$attributes->getLocationAttributes();
}
}