public function init ()
	{
		/** @var Settings $seoSettings */
		$seoSettings = Seo::$i->getSettings();

		// Fallbacks
		foreach (get_public_properties($this) as $key => $value)
			if (empty($value) && array_key_exists($key, $this->_fallback))
				$this->$key = $this->_fallback[$key];

		// Convert JSON decoded array to an Asset
		$image = $this->image;
		if (is_array($image)) $image = $image['id'];
		if (!($image instanceof Asset))
			$this->image = \Craft::$app->assets->getAssetById((int) $image);

		// Network Specific
		switch ($this->_network)
		{
			case 'facebook':
				$this->handle = $seoSettings->facebookAppId;
				break;
			case 'twitter':
				$this->handle = $seoSettings->twitterHandle;
				break;
		}
	}
public function init ()
	{
		
		$seoSettings = Seo::$i->getSettings();

		
		foreach (get_public_properties($this) as $key => $value)
			if (empty($value) && array_key_exists($key, $this->_fallback))
				$this->$key = $this->_fallback[$key];

		
		$image = $this->image;
		if (is_array($image)) $image = $image['id'];
		if (!($image instanceof Asset))
			$this->image = \Craft::$app->assets->getAssetById((int) $image);

		
		switch ($this->_network)
		{
			case 'facebook':
				$this->handle = $seoSettings->facebookAppId;
				break;
			case 'twitter':
				$this->handle = $seoSettings->twitterHandle;
				break;
		}
	}
public function init ( ) { /** @var Settings $seoSettings */ $ seoSettings = Seo :: $ i -> getSettings ( ) ; // Fallbacks foreach ( get_public_properties ( $ this ) as $ key => $ value ) if ( empty ( $ value ) && array_key_exists ( $ key , $ this -> _fallback ) ) $ this -> $ key = $ this -> _fallback [ $ key ] ; // Convert JSON decoded array to an Asset $ image = $ this -> image ; if ( is_array ( $ image ) ) $ image = $ image [ 'id' ] ; if ( ! ( $ image instanceof Asset ) ) $ this -> image = \ Craft :: $ app -> assets -> getAssetById ( ( int ) $ image ) ; // Network Specific switch ( $ this -> _network ) { case 'facebook' : $ this -> handle = $ seoSettings -> facebookAppId ; break ; case 'twitter' : $ this -> handle = $ seoSettings -> twitterHandle ; break ; } }
=========================================================================
=========================================================================