Inpsyde\MultilingualPress\Common\Type\FilterableTranslation::__construct PHP Method

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( array $args, Inpsyde\MultilingualPress\Common\Type\Language $language )
$args array Translation arguments.
$language Inpsyde\MultilingualPress\Common\Type\Language Language object.
    public function __construct(array $args, Language $language)
    {
        // TODO: Passing all the (different) stuff via an array really should be improved! Use fluent setters instead?!
        $this->icon_url = $args['icon_url'];
        $this->remote_title = (string) $args['remote_title'];
        $this->remote_url = $args['remote_url'];
        $this->source_site_id = (int) $args['source_site_id'];
        $this->suppress_filters = !empty($args['suppress_filters']);
        $this->target_content_id = (int) $args['target_content_id'];
        $this->target_site_id = (int) $args['target_site_id'];
        $this->type = (string) $args['type'];
        $this->language = $language;
    }